Pagini recente » Cod sursa (job #420063) | Istoria paginii runda/test_pozitiv/clasament | Cod sursa (job #1729141) | Cod sursa (job #1773404) | Cod sursa (job #1535455)
#include <fstream>
#define mod 1999999973
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
long long putere(long long base,long long exponent){
if(exponent==0)
return 1;
if(exponent%2)
return base*putere(base*base,exponent/2)%mod;
return putere(base*base,exponent/2)%mod;
}
int main()
{
long long a,b;
f>>a>>b, g<<putere(a,b);
return 0;
}