用途
をで求める.
計算量
使い方
mop(a,b,mod)でが返る.
実装
int mop(int a, int n, int mod = LLONG_MAX) { int res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res;}Verify
//TODO
をで求める.
mop(a,b,mod)でが返る.
int mop(int a, int n, int mod = LLONG_MAX) { int res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res;}//TODO
New content is available, click on reload button to update.
Downloading for offline use...