#92. 【模板】快速幂

【模板】快速幂

快速幂

给定 a,b,ma,b,m,输出 ab mod ma^b \bmod m。1≤a,b,m≤1091\le a,b,m\le 10^9。

输入格式

见题目描述。

输出格式

见题目描述。

样例

2 10 1000
24