Pagini recente » Cod sursa (job #1156991) | Cod sursa (job #2438711) | Diferente pentru problema/smin intre reviziile 5 si 7 | Cod sursa (job #2977864) | Cod sursa (job #1038192)
#include <iostream>
#include <fstream>
#define mod 1999999973;
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int a, b;
long long put(long long x, long long p){
if(p==1) return x;
{
long long e=put(x, p/2);
if(p&1) {return (x*e*e)%mod;}
else return (e*e)%mod;
}
}
int main()
{
f>>a>>b;
g<<put(a,b);
return 0;
}