Submission #19481

#TimeUsernameProblemLanguageResultExecution timeMemory
19481sujinΑ (kriii4_P1)C++14
100 / 100
0 ms1084 KiB
#include <cstdio> #define MOD 1000000007 long long pow(long long a, long long x) { if (x == 0) return 1LL; long long h = pow(a, x / 2); return h * h % MOD * ((x & 1) ? a : 1) % MOD; } int main() { long long a, x; scanf("%lld %lld", &a, &x); a %= MOD; printf("%lld", pow(a, x)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...