提交时间:2023-11-11 10:55:59
运行 ID: 109805
#include <bits/stdc++.h> #define int long long using namespace std; int ksm(int a,int b) { int res = 1,t = a; while (b >= 1) { if (b & 1) res = (res * t); t = (t * t);b >>= 1; } return res; } signed main() { int a,b; cin >> a >> b; printf("%lld",ksm(a,b)); return 0; }