Submission #106317

#TimeUsernameProblemLanguageResultExecution timeMemory
106317xiaowuc1Α (kriii4_P1)C++14
0 / 100
2 ms384 KiB
#include <algorithm> #include <cassert> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, int> plli; typedef vector<vector<ll>> matrix; ll modpow(ll b, ll e, ll m) { ll r = 1; b %= b; while(e) { if(e%2) { r*=b; r%=m; } b*=b; b%=m; e/=2; } return r; } void solve() { ll b, e; cin >> b >> e; cout << modpow(b, e, 1e9+7) << endl; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); /* int t; cin >> t; for(int i = 1; i <= t; i++) { cout << "Case #" << i << ": "; solve(); } */ solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...