Pagini recente » Atasamentele paginii Profil cristi_caragiale | Cod sursa (job #1556376) | Rating Neagoe George Danut (neagoe_george) | Cod sursa (job #2439510) | Cod sursa (job #1579650)
#include <iostream>
#include <fstream>
#define mod 1999999973
#define ll long long
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int Pw(int a,int b)
{ int sol=1,i;
for(i=0;i<=32;i++)
{ if (b&(1LL<<i)) sol=((ll) sol*a)%mod;
a=1LL*a*a%mod;
}
return sol;
}
int main()
{ int a,b;
f>>a>>b;
g<<Pw(a,b);
return 0;
}