标签:
1 #include <cstdio> 2 3 int main() 4 { 5 int a, b, sum; 6 while (scanf("%d%d", &a, &b) != EOF && (a && b)) 7 { 8 sum = 1; 9 while (b--) 10 { 11 sum *= a; 12 sum %= 1000; 13 } 14 printf("%d\n", sum); 15 } 16 return 0; 17 }
标签:
原文地址:http://www.cnblogs.com/LiuACG/p/4246924.html