Pagini recente » Cod sursa (job #1860774) | Cod sursa (job #1873032) | Monitorul de evaluare | Diferente pentru problema/algoritm intre reviziile 6 si 5 | Cod sursa (job #1870312)
#include <fstream>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
//#define mod 1999999973
const int mod = 1999999973;
int power(int a , int b){
if(b == 0)return 1;
if(b%2)return (1LL*a*power(a,b-1))%mod;
int v = (1LL*power(a,b/2))%mod;
return (1LL*v*v)%mod;
}
int a,b;
int main()
{
f >> a >> b;
g << power(a,b);
return 0;
}