Power Modulo
Print .
Multiplying by itself times is far too slow — use exponentiation by squaring ().
Input
Two integers and .
Output
.
Constraints
, . .
Sample 1
Input
2 10
Output
1024
Sample 2
Input
3 0
Output
1
Print .
Multiplying by itself times is far too slow — use exponentiation by squaring ().
Two integers and .
.
, . .
Input
2 10
Output
1024
Input
3 0
Output
1