Pagini recente » Autentificare | Diferente pentru utilizator/brainwashed20 intre reviziile 41 si 24 | Atasamentele paginii Profil 2chainz | Cod sursa (job #3332114) | Cod sursa (job #2493127)
#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)%1999999973;}
else return (x*x)%1999999973;
}
int main()
{
in>>a>>b;
out<<rise(a,b);
return 0;
}