Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
44581 | 张俊杰 | 生理周期 | C++ | Accepted | 3 MS | 272 KB | 331 | 2023-02-18 17:51:03 |
#include<iostream> using namespace std; int main() { int p, e, i, d; while (cin >> p >> e >> i >> d && p!= -1) { int k = d+1; for (; (k - p) % 23; k++); for (; (k - e) % 28; k=k+23); for (; (k - i) % 33; k = k + 23*28); cout<< "the next triple peak occurs in " << k-d << " days." << endl; } return 0; }