练习专区
今天的一小步就是明天的一大步
Problem 1777 A^B mod C
Accepted: 2
Total Submit: 72
Time Limit: 1000ms
Memory Limit: 30720KB
Description
Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,B,C<2^63).
Input
There are multiply testcases. Each testcase, there is one line contains three integers A, B and C, separated by a single space.
Output
For each testcase, output an integer, denotes the result of A^B mod C.
Sample Input
Sample Output
Hint