Submission #19296

#TimeUsernameProblemLanguageResultExecution timeMemory
19296cki86201Α (kriii4_P1)C++98
100 / 100
0 ms1720 KiB
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <math.h> #include <assert.h> #include <stack> #include <queue> #include <map> #include <set> #include <string> #include <algorithm> #include <iostream> #include <functional> using namespace std; typedef long long ll; typedef pair<int, int> Pi; #define Fi first #define Se second #define pb(x) push_back(x) #define sz(x) (int)x.size() #define rep(i,n) for(int i=0;i<n;i++) #define all(x) x.begin(),x.end() const ll MOD = 1e9 + 7; ll pw(ll a,ll b){ a %= MOD; ll res = 1; while(b){ if(b&1)res = (res * a) % MOD; a = (a * a) % MOD; b >>= 1; } return res; } int main(){ ll a, b; scanf("%lld%lld", &a, &b); printf("%lld", pw(a, b)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...