15 lines
255 B
C++
15 lines
255 B
C++
#include<cstring>
|
|
#include<cstdio>
|
|
#include<cmath>
|
|
const int mod=1;
|
|
int ksm(int a, int x) {
|
|
int ans = 1;
|
|
while (x) {
|
|
if (x & 1)
|
|
ans = ans * a % mod;
|
|
a = (a%mod) * (a%mod) % mod;
|
|
x >>= 1;
|
|
}
|
|
return ans;
|
|
}
|