Pagini recente » Monitorul de evaluare | Atasamentele paginii Profil Malig | Atasamentele paginii Matrita | Monitorul de evaluare | 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;
}