A计划--POJ1006 Biorhythms
来源:互联网 发布:c语言表白代码立体爱心 编辑:程序博客网 时间:2024/06/04 00:26
A题不分早晚!
第一道枚举水题
import java.util.Scanner;public class Main{public static void main(String[] args) { Scanner sc = new Scanner(System.in); int p,e,i,d; int m =1; while((p=sc.nextInt())!=-1&&(e=sc.nextInt())!=-1&&(i=sc.nextInt())!=-1&&(d=sc.nextInt())!=-1){ sc.nextLine(); int x = d+1; for(;x<=21252;x++){ if((x-p)%23==0) break; } for(;x<=21252;x+=23){ if((x-e)%28==0) break; } for(;x<=21252;x+=28*23){ if((x-i)%33==0) break; } System.out.println("Case "+(m++)+": the next triple peak occurs in "+(x-d)+" days."); }}}
阅读全文
0 0
- A计划--POJ1006 Biorhythms
- POJ1006 Biorhythms
- POJ1006 Biorhythms
- POJ1006 Biorhythms
- Poj1006 Biorhythms
- POJ1006 Biorhythms
- Biorhythms (POJ1006)
- poj1006 Biorhythms
- POJ1006-Biorhythms
- POJ1006-Biorhythms
- 【poj1006】 Biorhythms
- poj1006 Biorhythms
- POJ1006 Biorhythms
- [poj1006]Biorhythms
- POJ1006:Biorhythms
- POJ1006 Biorhythms
- POJ1006-Biorhythms
- POJ1006 Biorhythms
- VirtualBox虚拟机配置CentOS7网络
- Android属性动画Property Animation系列一之ValueAnimator
- 怎么提高CSDN博客积分和排名呢
- 内网穿透
- 后台管理UI
- A计划--POJ1006 Biorhythms
- 数据可视化之路
- Magento获取顾客评价列表
- 三种循环的适用情况
- 解密Redis持久化
- android 短信验证码自动填写的二种方法
- 从键盘获取3个整型数据
- 进程扇和进程链的实现
- 2017年11月11日的光棍节