Pagini recente » Cod sursa (job #1269264) | Cod sursa (job #2513937) | Diferente pentru problema/cezar intre reviziile 31 si 30 | Cod sursa (job #2143538)
#include <fstream>
using namespace std;
unsigned long long a,b,MOD,i,ans,pw;
int rise(unsigned long long a, unsigned long long b) {
if(b == 0) return 1;
unsigned long long x = rise(a, b / 2);
if(b % 2 == 0) return (x * x) % MOD;
return (((x * x) % MOD) * a) % MOD;
}
ifstream in ("lgput.in");
ofstream out ("lgput.out");
int main()
{in>>a>>b;
MOD=1999999973;
out<<rise(a,b);
return 0;
}