z-stepen
小Z先生有一个数学问题。对于给定的数字 O, S, M 他得计算数字O的第S次方,结果再模M(就是除以M的余数).
帮助小Z先生计算结果
翻译者:陈鸣--Spencer Velicue
Input标准输入的第一行也是唯一的一行包含数字O, S, M. (0 < O <= 2000000000), (0 < S <= 20000000000). (0 < M <= 4000).
Output向标准输出输出一个数字是 (O^S) mod M.
Input:
Output:
Explanation:
(2 ^ 10) mod 10 = 1024 mod 10 = 4
2 10 10Output:
4Explanation:
(2 ^ 10) mod 10 = 1024 mod 10 = 4
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.