标签:des style blog io color ar os sp java
2 3 12 6 6789 10000 0 0
8 984 1/*中国剩余定理: (a*b)%c=((a%c)*(b%c))%c; (a+b)%c=(a%c+b%c)%c; */ #include<stdio.h> int main() { int i,a,b; while(scanf("%d %d",&a,&b)&&(a+b)) { int sum=1; for(i=1;i<=b;i++) { sum=sum*a%1000; } printf("%d\n",sum); } return 0; }
标签:des style blog io color ar os sp java
原文地址:http://blog.csdn.net/hdd871532887/article/details/41128163