Pagini recente » Cod sursa (job #1096109) | Diferente pentru problema/polig intre reviziile 2 si 52 | Cod sursa (job #1097554) | Cod sursa (job #1094912) | Cod sursa (job #2281825)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
typedef long long Int;
const Int MOD= 1999999973LL;
int putere(Int baza,Int expo)
{
Int rez=1LL;
while(expo)
{
if(expo%2)
rez=rez*baza%MOD;
baza=baza*baza%MOD;
}
return rez;
}
Int n,p;
int main(){
f>>n>>p;
g<<putere(n,p);
return 0;
}