Submission #19367

#TimeUsernameProblemLanguageResultExecution timeMemory
19367kdh9949Α (kriii4_P1)C++98
0 / 100
0 ms1084 KiB
#include <cstdio> #include <algorithm> using namespace std; typedef long long ll; ll a, b, t, ans = 1; ll mod = 1000000007; int main(){ scanf("%lld%lld", &a, &b); t = a % mod; for(int i = 0; (1ll << i) <= b; i++){ if(b & (1 << i)) ans *= t, ans %= mod; t *= t; t %= mod; } printf("%lld\n", ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...