ZOJ 1160 Biorhythms
来源:互联网 发布:一键救砖刷机软件 编辑:程序博客网 时间:2024/05/17 08:38
中国剩余定理。
时间:94毫秒。
//Memory Time //256K 94MS #include<iostream>using namespace std;int main(void){int p,e,i,d;int time=1;while(cin>>p>>e>>i>>d){if(p==-1 && e==-1 && i==-1 && d==-1)break;int lcm=21252; // lcm(23,28,33)int n=(5544*p+14421*e+1288*i-d+21252)%21252;if(n==0)n=21252;cout<<"Case "<<time++<<": the next triple peak occurs in "<<n<<" days."<<endl;}return 0;}
0 0
- ZOJ 1160 Biorhythms
- 【数论】 HDOJ 1370 && POJ 1006 && ZOJ 1160 Biorhythms
- POJ 1006/ ZOJ 1160: Biorhythms - 中国剩余定理
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- Biorhythms
- zoj1160 Biorhythms
- 1006 Biorhythms
- 1006 Biorhythms
- JOJ1491:Biorhythms
- 数据库学习--全文本搜索
- hdu1234
- C++单体模式学习草稿
- Objective-C学习阶段的知识点总结
- HDU 1195 Open the Lock BFS
- ZOJ 1160 Biorhythms
- 关于ajax与注解详解
- Zony Save Manager
- 根据表中的行创建一个分隔列表
- 《Programming in Lua 3》读书笔记(二十)
- sql server 什么是全外连接,左外连接,右外连接,它们的区别又是什么?
- unity3d插件Daikon Forge GUI 中文教程-7-高级控件slider的使用
- STM32中GPIO的8种工作模式
- hdu 1071 The area