Pagini recente » Cod sursa (job #6115) | Cod sursa (job #1540658) | Cod sursa (job #2227391) | Cod sursa (job #2495139) | Cod sursa (job #2281854)
#include <bits/stdc++.h>
#define DIM 500005
#define MODULO 1999999973
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
int a, b;
int power( int a, int b )
{
if( b == 1 )
return a;
if( b % 2 == 0 )
return (power( a*a, b/2 ))%MODULO;
else
return (a*power(a*a, (b-1)/2))%MODULO;
}
int main()
{
in>>a>>b;
out<<power(a, b);
return 0;
}