Toggle navigation
万里ACM
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem D: 取余运算
Problem D: 取余运算
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
513
Solved:
39
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
输入b,p,k的值,求b^p mod k的值(即b的p次方除以k的余数)。其中b,p,k*k为32位整数。
Input
输入b,p,k的值
Output
输出b^p mod k的值
Sample Input
Copy
2 10 9
Sample Output
Copy
2^10 mod 9=7