Submission #19304

#TimeUsernameProblemLanguageResultExecution timeMemory
19304tncks0121Α (kriii4_P1)C++14
100 / 100
0 ms1084 KiB
#include <stdio.h> int main() { long long a, b; scanf("%lld%lld", &a, &b); long long mod = (long long)1e9 + 7; a %= mod; long long cur = 1; while(b > 0) { if(b & 1) cur = (cur * a) % mod; a = (a * a) % mod; b >>= 1; } printf("%lld\n", cur); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...