Submission #32307

#TimeUsernameProblemLanguageResultExecution timeMemory
32307TAMREFΑ (kriii4_P1)C++11
100 / 100
0 ms2016 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1e9+7; ll npow(ll a, ll n){ ll res = 1, pval = a%mod; for(;n;n>>=1,pval=pval*pval%mod){ if(n&1) res = res*pval%mod; } return res; } int main(){ ll a,n; cin>>a>>n; cout<<npow(a,n)<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...