Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
8075 邓小龙 生理周期 C++ Accepted 5 MS 256 KB 533 2025-06-13 15:37:43

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int p,e,i,d,ans; cin>>p>>e>>i>>d; //p23天、 e28天和i33天 for(int k=d+1;k<=21252;k++){//从d+1天开始穷举,直到找到结果为止 //体力峰值一定是p+x1*23=k,情商峰值是e+x2*28=k,智商峰值是i+x3*33=k if( (k-p)%23==0 && (k-e)%28==0 && (k-i)%33==0){ ans=k-d; break; } } cout<<"the next triple peak occurs in "<<ans<<" days."; return 0; }