#include #include #include #include #include #include #include #include using namespace std; typedef pair PII; typedef vector VI; typedef vector> VII; typedef vector> VVI; typedef vector>> VVP; int potenca(int x, int n) { if (n==0) return 1; if (n%2==0) { //return potenca(x,n/2)*potenca(x,n/2); int a=potenca(x,n/2); return a*a; } else { return potenca(x,n-1)*x; } } int main() { //cout << potenca(2,10) << endl; cout << potenca(3,1000000000) << endl; return 0; }