Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIPMOD - Power mod

Given there integer x, n, k (0<= n <= 10^18, 1<=x, k <=10^9), calculate xn%k.

 

Input

Three integer x, n, k

Output

The value of xn%k

Example

Input:
2 10 100

Output:
24

Added by:Ha Minh Ngoc
Date:2021-11-08
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.