觀念 (c++):
算a的b次方(超快):
#include\ \using namespace std;int main(){ int a,b; while(scanf("%d%d",&a,&b)==2) { int ans=1; while(b!=0) { if(b%2) ans*=a; a*=a; b/=2; } printf("%d\n",ans); }}