Pagini recente » Statistici Gandalf the White (GandalfTheWhite) | Diferente pentru problema/palindrom3 intre reviziile 1 si 7 | Monitorul de evaluare | Cod sursa (job #1524605) | Cod sursa (job #2252100)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
unsigned long long powLog(int baza, int exponent) {
int sol = 1;
for(int i = 1; i<(1<<30); i = i*2) {
if(i&exponent) sol = sol * baza;
baza *= baza;
}
return sol;
}
int main() {
int b, e;
f>>b>>e;
g<<powLog(b, e);
}