1002 Biorhythms
来源:互联网 发布:西班牙手机网络 编辑:程序博客网 时间:2024/06/16 10:13
gtmd数论
中国剩余定理一点都没看过.......
参考:https://wenku.baidu.com/view/b93355c6534de518964bcf84b9d528ea80c72f5c.html
#include<iostream>#include<cstdio>#include<cmath>#include<vector>#include<algorithm>#include<queue>#include<ctime>#include<cstring>#include<stdlib.h>#include<map>using namespace std;int iq,p,e,d,num,count_;int main(){//freopen("1.in","r",stdin);//freopen("1.out","w",stdout);while(++ count_){scanf("%d%d%d%d",&p,&e,&iq,&d);if(d == -1) break;num = 1288*iq+14421*e+5544*p;if(num > d)while(num-21252 > d) num -= 21252;else while(num <= d) num += 21252;printf("Case %d: the next triple peak occurs in %d days.\n",count_,num - d);}//fclose(stdin);fclose(stdout);return 0;}
阅读全文
0 0
- 1002 Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- zoj1160 Biorhythms
- 1006 Biorhythms
- 1006 Biorhythms
- JOJ1491:Biorhythms
- POJ1006 Biorhythms
- POJ1006 Biorhythms
- 机器学习笔记--微积分
- 动态规划? 最大连续子序列和
- 面试中的一些必须知道的简单知识
- Python中接口定义和依赖注入
- postgresql复制
- 1002 Biorhythms
- (2017多校2)1003/hdu-6047 Maximum Sequence(单调队列/优先队列)
- STM32用到的几种存储器
- bosten key party 2017 memo writeup
- CS231n课程笔记翻译7:神经网络笔记 part2
- 【POJ 1088】滑雪
- 数据结构基础知识-线性表
- 0727Link
- 锁定Excel