Submit | All submissions | Best solutions | Back to list |
EIUPH008 - Power Mod |
Given 3 integers x, n and k. Calculate the value of xn % k.
Input
THe only line contains three integers x, n, k (0< k <=109 , n>=0, x>=0).
Output
The value of the expression
Example
Input: 2 8 5 Output: 1
Added by: | Ha Minh Ngoc |
Date: | 2015-01-28 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NCSHARP GOSU JULIA PYPY3 |