Pagini recente » Cod sursa (job #1744325) | Cod sursa (job #1789882) | Diferente pentru problema/bfs intre reviziile 14 si 13 | Cod sursa (job #1041061) | Cod sursa (job #2705843)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int64_t MOD=1999999973LL;
int64_t n,p,putere(int64_t,int64_t);
int main(){
f>>n>>p;
g<<putere(n,p);
}
int64_t putere(int64_t b, int64_t e){
if(e==0)
return 1LL;
int64_t r=putere(b,e/2);
r = r *r % MOD;
if(e%2==1)
r=r*b%MOD;
return r;
}