# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19381 | tonyjjw | Α (kriii4_P1) | C++14 | 0 ms | 1716 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//*
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |