Pagini recente » Cod sursa (job #21794) | Cod sursa (job #242378) | Cod sursa (job #2750351) | Cod sursa (job #5081) | Cod sursa (job #229603)
Cod sursa(job #229603)
#include<fstream>
#include<iostream>
using namespace std;
int mod = 1999999973;
int put(int x,int y)
{
if( y==0 ) return 1;
if( y&1==1 ) return (long long)(x)*(long long)(put(x,y-1))%mod;
int aux = put(x,y>>1);
aux=((long long)aux*(long long)aux)%mod;
return aux;
}
int main()
{
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int x,y;
fin>>x>>y;
fout<<put(x,y);
fout.close();
return 0;
}