Pagini recente » Cod sursa (job #1192542) | Cod sursa (job #2548709) | Cod sursa (job #3255682) | Cod sursa (job #2026834) | 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;
}