Submission #19335

#TimeUsernameProblemLanguageResultExecution timeMemory
19335gs13068Α (kriii4_P1)C++98
100 / 100
0 ms1084 KiB
#include <cstdio> const int p = 1000000007; int f(int x, int y) { return y & 1 ? (long long)f(x, y ^ 1)*x%p : y ? f((long long)x*x%p, y >> 1) : 1; } int main() { long long a, b; scanf("%lld%lld", &a, &b); printf("%d", f(a%p, b % (p - 1))); }
#Verdict Execution timeMemoryGrader output
Fetching results...