Pagini recente » Cod sursa (job #2455912) | Diferente pentru happy-coding-2007/solutii intre reviziile 26 si 27 | Cod sursa (job #1255190) | Diferente pentru happy-coding-2007/solutii intre reviziile 23 si 24 | Cod sursa (job #1462683)
#include <fstream>
#define LL long long
#define mod 1999999973
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
LL power(LL x,LL n)
{
LL rez;
if (n==0) return 1;
rez=power((x*x)%mod,n/2);
if (n%2) rez=(rez*x)%mod;
return rez;
}
int main()
{
LL x,n;
f>>x>>n;
g<<power(x,n);
return 0;
}