제출 #19386

#제출 시각아이디문제언어결과실행 시간메모리
19386kdh9949Α (kriii4_P1)C++98
0 / 100
0 ms1084 KiB
#include <cstdio> #include <algorithm> using namespace std; typedef long long ll; ll a, b; ll mod = 1000000007; ll pw(ll x, ll k){ if(k == 0) return 1; if(k == 1) return x; ll t = pw(x, k / 2); t *= t; t %= mod; if(k % 2) return t * x % mod; return t; } int main(){ scanf("%lld%lld", &a, &b); printf("%lld\n", pw(a, b)); }
#Verdict Execution timeMemoryGrader output
Fetching results...