Pagini recente » Diferente pentru problema/dijkstra intre reviziile 47 si 12 | Cod sursa (job #2104843) | Cod sursa (job #2035602) | Cod sursa (job #1995924) | Cod sursa (job #1046784)
#include <iostream>
#include<fstream>
using namespace std;
long long a,b,c;
ifstream f("lgput.in");
ofstream g("lgput.out");
long long fun(long long x,long long y)
{
if(y==1)
return x*x%c;
else
if(y%2==0)
return (fun(x,y/2)%c)*(fun(x,y/2)%c)%c;
else
return x*fun(x,y/2)%c;
}
int main()
{
c=1999999973;
f>>a>>b;
g<<fun(a,b);
}