Pagini recente » Cod sursa (job #880278) | Cod sursa (job #2353189) | Cod sursa (job #2661684) | Cod sursa (job #83380) | Cod sursa (job #1679486)
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("lgput.in" );
ofstream g("lgput.out");
#define MOD 1999999973
int N, P;
int square(int x) { return x*x; }
long long FastPow(int base, int exponent) {
if ( exponent == 0 ) return 1;
if ( exponent%2 == 0 )
return square(FastPow(base, exponent/2)) % MOD;
else
return (base * FastPow(base, exponent-1)) % MOD;
}
int main() {
f >> N >> P;
g << FastPow(N, P);
}