标签:man data mod too oat online memory tip who
#include <stdio.h> int main() { int a,b,_a,s; while(scanf("%d %d",&a,&b)!=EOF) { if(a==0&&b==0) break; s=1; while(b) { if(s>=10) s=s%10; if(a>=10) a=a%10; if(b%2==1) s=s*a; a=a*a; b=b/2; } if(s>=10) s=s%10; printf("%d\n",s); } return 0; }
标签:man data mod too oat online memory tip who
原文地址:http://www.cnblogs.com/yxysuanfa/p/6884172.html