Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
42145 | 刁泓烨 | 生理周期 | C++ | Accepted | 125 MS | 280 KB | 377 | 2022-11-13 09:42:13 |
#include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> using namespace std; int main() { int p,e,i,d; cin>>p>>e>>i>>d; for(int c=p;c<21252;c+=23){ for(int j=e;j<21252;j+=28){ for(int m=i;m<21252;m+=33){ if(c==j and c==m){ cout<<"the next triple peak occurs in "<<j-d<<" days."; return 0; } } } } return 0; }