Pagini recente » Cod sursa (job #1496906) | Cod sursa (job #2493127) | Cod sursa (job #2493190) | Diferente pentru moisil-2015/geometrie intre reviziile 2 si 3 | Cod sursa (job #2493126)
#include <fstream>
using namespace std;
ifstream in ("lgput.in");
ofstream out ("lgput.out");
unsigned long long a,b;
unsigned long long rise (unsigned long long a,unsigned long long b)
{
long long x;
if(b==0)return 1;
x=rise(a,b/2);
if(b%2==1){return (x*x)%1999999973*a;}
else return (x*x)%1999999973;
}
int main()
{
in>>a>>b;
out<<rise(a,b);
return 0;
}