Biorhythms
题意翻译
输入包含若干个测试点,以四个 $-1$ 结束。
每一个测试点输入四个整数 $p$, $e$, $i$ 和 $d$。要你找到最小的 $x$,使得 $x > d$ 并且
$$x \equiv p \pmod{23}$$
$$x \equiv e \pmod{28}$$
$$x \equiv i \pmod{33}$$
输出 $x - d$ 的值,保证 $x$ 不超过 $21252$。
输出请按照如下格式:
> Case 1: the next triple peak occurs in 1234 days.
注意:即使答案是 $1$,也要试用复数形式 `days`。
翻译者:Tweetuzki
题目描述
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=697
[PDF](https://uva.onlinejudge.org/external/7/p756.pdf)
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA756/329b737b4282ecf0453655ef99a6ed722e0b36b8.png)
输入输出格式
输入格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA756/81cd6f8d5dfe0c72bece093ba441fb7e6c18241c.png)
输出格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA756/a5871e0729ee76f328863bd6062e300eea9930c1.png)
输入输出样例
输入样例 #1
0 0 0 0
0 0 0 100
5 20 34 325
4 5 6 7
283 102 23 320
203 301 203 40
-1 -1 -1 -1
输出样例 #1
Case 1: the next triple peak occurs in 21252 days.
Case 2: the next triple peak occurs in 21152 days.
Case 3: the next triple peak occurs in 19575 days.
Case 4: the next triple peak occurs in 16994 days.
Case 5: the next triple peak occurs in 8910 days.
Case 6: the next triple peak occurs in 10789 days.