标签:
Description
Input
Output
Sample Input
Sample Output
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 int a,b; 7 while(scanf("%d%d",&a,&b)&&(a!=0||b!=0)) 8 { 9 int num=1; 10 for(int i=0;i<b;i++) 11 { 12 num*=a%1000; 13 num%=1000; 14 } 15 printf("%d\n",num%1000); 16 } 17 }
标签:
原文地址:http://www.cnblogs.com/guofeng1022/p/4245806.html