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.

EIPOWMOD2 - PowMod function

Cho a, b, c tính ab mod c.

Input

Một dòng gồm 3 số a, b, c (1 <= a, c <= 109; 1<=b<=1018).

Output

Một số nguyên duy nhất là kết quả của phép toán.

Example

Input:
3 5 7

Output:
5

Added by:Ha Minh Ngoc
Date:2016-11-02
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.