Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137185 唐诗阳 生理周期 C++ Time Limit Exceeded 1000 MS 268 KB 661 2025-11-16 15:08:02

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int p,e,i,d,s; cin>>p>>e>>i>>d; for(int k=d;;k++){ if(p==e && e==i){ s=p; break; } else if(p<e && p<i){ p+=23; } else if(e<p && e<i){ e+=28; } else if(i<p && i<e){ i+=33; } } cout<<"the next triple peak occurs in "<<s-d<<" days."; return 0; }