POJ 1006 Biorhythms [中国剩余定理] 超短代码
2017-07-15 21:05
309 查看
中国剩余定理模板题,线下算出23,28,33的同余有奇效。
没错。。O(1)出答案。。
#include<cstdio> int main(){ for(int p,e,i,d,count=1;scanf("%d%d%d%d",&p,&e,&i,&d)!=EOF&&p!=-1&&e!=-1&&i!=-1&&d!=-1;count++) printf("Case %d: the next triple peak occurs in %d days.\n",count,((5544*p+14421*e+1288*i-d)%21252)<=0?((5544*p+14421*e+1288*i-d)%21252+21252):(5544*p+14421*e+1288*i-d)%21252); }
没错。。O(1)出答案。。
相关文章推荐
- POJ 1006 Biorhythms 中国剩余定理
- 【poj 1006】Biorhythms 中国剩余定理
- poj 1006 Biorhythms 中国剩余定理
- POJ 1006 Biorhythms (数论-中国剩余定理)
- |poj 1006|中国剩余定理|Biorhythms
- POJ1006_Biorhythms【中国剩余定理】
- poj1006_Biorhythms_扩展欧几里得_中国剩余定理
- POJ 1006---Biorhythms【中国剩余定理】
- POJ-1006 Biorhythms 中国剩余定理
- 中国剩余定理 POJ 1006 Biorhythms
- POJ 1006 Biorhythms 中国剩余定理
- POJ 1006 Biorhythms 中国剩余定理
- poj 1006 Biorhythms 中国剩余定理
- POJ 1006 Biorhythms (数论-中国剩余定理)
- poj 1006 Biorhythms 中国剩余定理
- poj 1006 Biorhythms(中国剩余定理的应用)
- POJ 1006 Biorhythms (数论-中国剩余定理)
- poj1006 Biorhythms<中国剩余定理>
- POJ 1006 Biorhythms --中国剩余定理(互质的)
- poj 1006 Biorhythms 中国剩余定理