永发信息网

能帮我翻译一下这道题么?

答案:2  悬赏:30  手机版
解决时间 2021-07-21 19:52

Biorhythms

Time Limit:1000MS Memory Limit:10000K
Total Submit:20 Accepted:14

Description

Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentration will be easier.
Since the three cycles have different periods, the peaks of the three cycles generally occur at different times. We would like to determine when a triple peak occurs (the peaks of all three cycles occur in the same day) for any person. For each cycle, you will be given the number of days from the beginning of the current year at which one of its peaks (not necessarily the first) occurs. You will also be given a date expressed as the number of days from the beginning of the current year. You task is to determine the number of days from the given date to the next triple peak. The given date is not counted. For example, if the given date is 10 and the next triple peak occurs on day 12, the answer is 2, not 3. If a triple peak occurs on the given date, you should give the number of days to the next occurrence of a triple peak.

Input

You will be given a number of cases. The input for each case consists of one line of four integers p, e, i, and d. The values p, e, and i are the number of days from the beginning of the current year at which the physical, emotional, and intellectual cycles peak, respectively. The value d is the given date and may be smaller than any of p, e, or i. All values are non-negative and at most 365, and you may assume that a triple peak will occur within 21252 days of the given date. The end of input is indicated by a line in which p = e = i = d = -1.

Output

For each test case, print the case number followed by a message indicating the number of days to the next triple peak, in the form:

Case 1: the next triple peak occurs in 1234 days.

Use the plural form ``days'' even if the answer is 1.

最佳答案

生物钟


时间限制1000毫秒 记忆限制10000k


总共上交20份 合格14份


概况


一些人相信自从他们出生伊始生命中就有三个循环 这三个分别是 身体的 心情的 智力上的循环 它们分别有23天 28天23天的长度 每个循环都有顶峰时期 在循环的顶峰时期时 一个人会在身体的 心情的 智力上 表现出众 举例来说 如果是 精神曲线 那么 思考进程会更犀利 并且更易于专注


由于 三个循环有着三个不同周期 顶峰时期就会发生在不同的时间段 我们来确定一下三倍顶峰发生(三个顶峰发生于同一天内)在任何人身上 对于每个循环来说 你将在任何一个顶峰发生的当今年份的开始给予一个数字 (无必要是第一年)你也会被给予一个可以描述为从这一年开始的的天数日期 你的任务就是确定从被给予数字的日期到下一个顶峰的天数数量 已被给予的那一天不算在内 举例来说 如果被给予的日期是10号 下个顶峰发生日期在12号 答案是2 不是3 入果一个三倍顶峰发生在被给予的日期内 你需要给出到下个三倍顶峰发生的天数


稍等一会 我妈叫我

全部回答

生物节律

时间限制:1000MS内存限制:10000K 共提交:20接受日期:14

描述

有些人认为,有一个人的一生有三大周期,开始新的一天,他或她出生。这三个周期的身体,情绪和智力周期,他们的长度23,28和33天,分别时期。有一个在每一个周期的高峰期。在一个周期高峰的人他或她在相应的领域中的最佳表现(身体,心理或精神)。例如,如果是心理曲线,思维过程会更加严峻,浓度会有所改善。 由于三个周期的不同时期,三个周期的峰值一般出现在不同的时间。我们要确定什么时候出现了三重峰(所有三个周期的峰值出现在同一天)的任何人。对于每个周期,您将获得的日子,从今年年初的数目,而其峰1(不一定是第一个)发生。您还将得到一个日期的天从今年年初即表示。你的任务是确定从给定的日期为明年三高峰的天数。给定日期是不计算在内。例如,如果给定的日期是10和明年三高峰时,答案是2,不是3天12。如果一个三重峰在给定的日期时,您应该给多少天的三重峰下发生。

输入

您将获得一些案件。每个案件由一个输入四个整数p,电子,我和D线的值p,电子,和我的天,从今年初进行的,在生理,情绪多少和智力周期的峰值,分别。该值d是给定的日期,并可能比p的,电子邮件,或任何更小的岛所有值都是非负,最多365,你可以假设一个三高峰将发生在21252给定的日期天。在输入端所指出的,是一条线在在P二E =我=Ḏ= -1。

输出

对于每个测试案例,案例编号打印在表格1显示的天数下后三高峰消息: 案例1:在未来三高峰1234天发生。

我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
笔记本的性能好与差
求 这 美 女 名 字
龙江县齐齐哈尔小博士书店哪位知道具体地址啊
为什么动不动生气、看别人不顺眼?是否心理有
男生烫发,现在都流行哪种?
vincent 原唱是谁
为什么联想S900手机的QQ老卡???
QQ三国剑士60级和70级技能那个强 它们有什么
富士通笔记本的液晶屏多少钱一个
开福区长沙湖南老百性投资集团在什么地方啊,
QQ为什么上不上去
房产中介标语用什么好,房产中介标语用什么好
对于胃于腔口非常不好会产生不量反应.
求劲舞团中好听的歌曲。
为什么我不吃饭。会头晕
推荐资讯
修武县焦作食尚便利店这个地址在什么地方,我
求助DIY高手 来一个好点的配置单
我不想这样,大家帮帮我。
缙云山现在还在下雪没有
求完整版〈〈只能谈情不能说爱〉〉小说
赠送叠加流量包是什么,流量叠加包月是什么意
什么是底盘电控系统?
罗田县黄冈木工装饰材料哪位知道具体地址啊
呼吸(打一成语)
若(X-3)的平方等于-根号下Y+1,求Y-2分之(X-1)
为什么开通超级QQ再开通QQ加油站不可以收两边
扶沟县周口中国电信(大新营业厅)地址是什么,
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?