编程介的小学生
2017-10-29 08:51PowMod
Problem Description
Declare:
k=∑mi=1φ(i∗n) mod 1000000007
n is a square-free number.
φ is the Euler's totient function.
find:
ans=kkkk...k mod p
There are infinite number of k
Input
Multiple test cases(test cases ≤100), one line per case.
Each line contains three integers, n,m and p.
1≤n,m,p≤107
Output
For each case, output a single line with one integer, ans.
Sample Input
1 2 6
1 100 9
Sample Output
4
7
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- PowMod
- sample
- each
- 1个回答