Super A^B mod C

TimeLimit:1000MS  MemoryLimit:32MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏 | 已有5人收藏了本题
Problem Description

Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B<=10^1000000).

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
3 2 4
2 10 1000
SampleOutput
1
24
Submit
题目统计信息详细
总AC数94
通过人数52
尝试人数60
总提交量256
AC率20.31%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

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