Submission #19366

#TimeUsernameProblemLanguageResultExecution timeMemory
19366kdh9949Α (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(ll i = 0; (1ll << i) <= b; i++){ if(b & (1 << i)) ans *= t, ans %= mod; t *= t; t %= mod; } printf("%lld", ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...