Pagini recente » Cod sursa (job #3261818) | Cod sursa (job #2367897) | Cod sursa (job #1277361) | Cod sursa (job #1012641) | Cod sursa (job #2164769)
#include <fstream>
#define mod 1999999973
using namespace std;
long long n,k;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long putere( long long x, long long y )
{
long long rsp = 1;
for( int i = 0; ( 1LL << i ) <= y; i++)
{
if( ( 1LL << i ) & y )
rsp = ( rsp * x ) % mod;
x = ( x * x ) % mod;
}
return rsp;
}
int main()
{
fin>>n>>k;
fout<<putere( n, k );
return 0;
}