Run ID:42145
提交时间: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; }