Pagini recente » Cod sursa (job #1992533) | Cod sursa (job #1290534) | Cod sursa (job #1123746) | Cod sursa (job #907119) | Cod sursa (job #427620)
Cod sursa(job #427620)
#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
#define MOD 1999999973
typedef long long ll;
void open(){
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
}
ll a,b;
ll bigmod(ll a,ll b){
if (b==0) return 1;
if (b==1) return a%MOD;
if (b%2==0){
ll x=bigmod(a,b/2);
return (x*x)%MOD;
}
return (a*bigmod(a,b-1))%MOD;
}
int main(){
open();
scanf("%lld%lld",&a,&b);
printf("%lld\n",bigmod(a,b));
//system("pause");
return 0;
}