标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)2 3 12 6 6789 10000 0 0
8 984 1#include<stdio.h>
//#include<stdlib.h>
main()
{
int a,b,i,j,k,n,d,s;
while(scanf("%d%d",&a,&b)&&(a!=0&&b!=0))
{
s=1;
for(i=1;i<=b;i++)
{
s=s*a;
if(s>10000)
s=s%1000;
}
printf("%d\n",s%1000);
}
//system("pause");
return 0;
}
标签:
原文地址:http://blog.csdn.net/l15738519366/article/details/45676737