Pagini recente » Diferente pentru implica-te/arhiva-educationala intre reviziile 159 si 160 | Cod sursa (job #1455625) | Cod sursa (job #1261270) | Cod sursa (job #2976106) | Cod sursa (job #583828)
Cod sursa(job #583828)
#include <cstdio>
#define mod 1999999973
using namespace std;
long long pow(long long a, long long b) {
if (b == 0) return 1L;
if (b == 1) return a;
long long temp = pow(a, b >> 1);
temp = (temp * temp) % mod;
if (b & 1) temp = (temp * a) % mod;
return temp;
}
long long a, b;
int main() {
freopen("lgput.in", "r", stdin);
freopen("lgput.out", "w", stdout);
scanf("%lld %lld", &a, &b);
printf("%lld", pow(a, b));
return 0;
}