#include <iostream> using namespace std; int quick(int a,int b) { int s=1; while(b) { if(b%2==1) s*=a; a*=a; b/=2; } return s; } int main() { int a,b; cin>>a>>b; int s=quick(a,b); cout<<s; }
#include <iostream> using namespace std; int quick(int a,int b) { int s=1; while(b) { if(b%2==1) s*=a; a*=a; b/=2; } return s; } int main() { int a,b; cin>>a>>b; int s=quick(a,b); cout<<s; }