A^B mod C

TimeLimit:1000MS  MemoryLimit:32MB
64-bit integer IO format:%lld
未提交 | 登录后收藏 | 已有8人收藏了本题
Problem 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.

SampleInput
1000000008 10000000000000 1000000007
2 10 1000
3 2 4
SampleOutput
1
24
1
Submit
题目统计信息详细
总AC数95
通过人数63
尝试人数109
总提交量600
AC率10.50%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: