Submission #19381

#TimeUsernameProblemLanguageResultExecution timeMemory
19381tonyjjwΑ (kriii4_P1)C++14
100 / 100
0 ms1716 KiB
//* #include <stdio.h> #include <string.h> #include <ctype.h> #include <time.h> #include <stdlib.h> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <map> #include <string> #include <numeric> #include <functional> #define MOD 1000000007 #define MAX 0x3f3f3f3f #define MAX2 0x3f3f3f3f3f3f3f3fll #define ERR 1e-10 #define mp make_pair #define all(x) (x).begin(), (x).end() #pragma warning(disable:4996) using namespace std; typedef long long ll; typedef long double ldb; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; ll x, y; int main() { int i, j, k; cin>>x>>y; x%=MOD; ll ans=1; while(y) { if(y%2) ans*=x, ans%=MOD; x*=x, x%=MOD; y/=2; } cout<<ans; return 0; } //*/
#Verdict Execution timeMemoryGrader output
Fetching results...