Pagini recente » Cod sursa (job #1782497) | Cod sursa (job #2235298) | Clasament sim_10_2016 | Cod sursa (job #2032291) | Cod sursa (job #2376504)
#include <bits/stdc++.h>
#define MOD 1999999973
#define ull unsigned long long
using namespace std;
ifstream fin( "lgput.in" );
ofstream fout( "lgput.out" );
ull power( ull a, ull b )
{
if ( b == 1 ) return a;
ull p = power( a, b / 2 );
p = ( p * p ) % MOD;
if ( b % 2 != 0 )
p = ( p * a ) % MOD;
return p;
}
int main()
{
ull a, b;
fin >> a >> b;
fin.close();
fout << power( a, b );
fout.close();
return 0;
}