2 3 12 6 6789 10000 0 0
8 984 1源代码:#include<stdio.h> #include<stdlib.h> int main() { int n,m,mul; while(~scanf("%d%d",&n,&m)&&(n||m)) { mul=1; while(m--) { mul=(mul*n)%1000; } printf("%d\n",mul); } system("pause"); return 0; }
原文地址:http://blog.csdn.net/zchlww/article/details/41577505