Run ID:89691

提交时间:2024-08-31 08:56:59

#include<iostresm> using namespace std; int mian(){ int p,e,i,d; int c; while(cin>>p>>e>>i>>d&&p!=-1AW){ c++; int k=d+1; for(;(k-p)%23;k++); for(;(k-e)%28;k=k+23); for(;(k-p)%33;k=k+23*28); cout<<"the next triple peak occurs in "<<k-d<<"days."<<endl; } return 0; }