Pagini recente » Cod sursa (job #1170064) | Diferente pentru problema/functii intre reviziile 2 si 1 | Cod sursa (job #2070249) | Cod sursa (job #2870737) | Cod sursa (job #2335853)
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
long long power(long long x, long long y){
if(y==0)
return 1;
if(y==1)
return x;
long long res=power(x,y/2);
if(y%2==0)
return res*res;
return res*res*x;
}
int main(){
long long x;
long long y;
f>>x>>y;
g<<power(x,y);
}