Problem B: 模意义下的乘法逆元
Memory Limit:125 MB
Time Limit:0.500 S
Judge Style:Text Compare
Creator:
Submit:10
Solved:8
Description
给定正整数 ,求 中所有整数在模 意义下的乘法逆元。
模 的乘法逆元定义为 的解。
Input
一行两个正整数 。
Output
输出 n 行,其中第 i 行表示 i 在模 p 下的乘法逆元。
Sample Input Copy
10 13
Sample Output Copy
1
7
9
10
8
11
2
5
3
4
HINT
所有数据满足 ,。
输入保证 为质数。