Pagini recente » Cod sursa (job #1425469) | Cod sursa (job #2964829) | Cod sursa (job #485865) | Cod sursa (job #1682565) | 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;
}