Run ID:43670

提交时间:2022-12-24 12:16:53

#include<bits/stdc++.h> using namespace std; int main() { int p,e,i,d; cin>>p>>e>>i>>d; for(int x=0; x<21252/23; x++) { for(int y=0; y<21252/28; y++) { for(int z=0; z<21252/33; z++) { if(p+23*x==e+28*y&&e+28*y==i+33*z&&e+28*y>=d) { cout<<"the next triple peak occurs in "<<e+28*y-d<< " days."; return 0; } } } } return 0; }