Pagini recente » Cod sursa (job #1535017) | Cod sursa (job #1914356) | Cod sursa (job #762797) | Cod sursa (job #1939610) | Cod sursa (job #2915607)
#include <fstream>
#define LL unsigned long long int
#define MOD 1999999973
using namespace std;
LL a,b;
ifstream cin ("lgput.in");
ofstream cout ("lgput.out");
int power(LL base, LL exp)
{
if(!exp) return 1;
if(!(exp%2))
{
LL current=power(base,exp/2);
return ((current%MOD)*(current%MOD))%MOD;
}
else return (base*(power(base,exp-1)%MOD)%MOD);
}
int main()
{
cin>>a>>b;
cout<<power(a,b);
}