Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
44578 | 陈梓睿 | 生理周期 | C++ | Accepted | 2 MS | 268 KB | 382 | 2023-02-18 17:45:46 |
#include<iostream> using namespace std; #define N 21252 int main() { int p, e, i, d; int casenum = 0; while (cin >> p >> e >> i >> d && p!= -1) { casenum++; 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; }