Pagini recente » Cod sursa (job #3215194) | Cod sursa (job #568704) | Cod sursa (job #747962) | Borderou de evaluare (job #2668398) | Cod sursa (job #2341980)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll const mod=1000000007;
ll const md=998244353;
ll mypowr(ll a,ll b) {ll res=1;a%=mod; assert(b>=0);
for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll mypow(ll a,ll b) {ll res=1;assert(b>=0);
for(;b;b>>=1){if(b&1)res=res*a;a=a*a;}return res;}
ifstream in("lgput.in");
ofstream out("lgput.out");
#define mp make_pair
#define pb push_back
#define pf push_front
#define fi first
#define se second
int main()
{ cout<<fixed<<setprecision(12);
cin.tie(0);cout.tie(0);
ios_base::sync_with_stdio(0);
ll a,b;
in>>a>>b;
ll y=1;
while(b!=1){
if(b&1){
y*=a;
y%=1999999973;--b;
}
if(b>1)a*=a;
a%=1999999973;
b/=2;
}
a*=y;
a%=1999999973;
out<<a<<'\n';
return 0;
}