Submission #20152

#TimeUsernameProblemLanguageResultExecution timeMemory
20152veckalΑ (kriii4_P1)C11
100 / 100
0 ms1084 KiB
#include <stdio.h> #define MOD 1000000007 typedef long long ll; ll pow(ll base, ll exp) { if (exp == 1) return base; ll ret = pow(base, exp>>1); ret = (ret * ret) % MOD; if (exp&1) ret = (ret * base) % MOD; return ret; } ll a, x; int main() { scanf("%lld%lld", &a, &x); printf("%lld\n", pow(a%MOD, x)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...