标签:namespace http mat .com include color ble ide alt
题目链接:http://poj.org/problem?id=1006
题意:中文题。
中国剩余定理:
1 #include <cstdio> 2 #include <cmath> 3 4 using namespace std; 5 6 int main() 7 { 8 int p,e,i,d; 9 int Case=1; 10 int lcd = 21252; 11 while(scanf("%d%d%d%d",&p,&e,&i,&d),p!=-1) 12 { 13 int n = (5544*p+14421*e+1288*i)%lcd; 14 if(n<=d) n+=lcd; 15 printf("Case %d: the next triple peak occurs in %d days.\n",Case,n-d); 16 Case++; 17 } 18 return 0; 19 }
标签:namespace http mat .com include color ble ide alt
原文地址:http://www.cnblogs.com/TreeDream/p/6686789.html