Run ID:119764
提交时间:2025-05-18 18:40:23
#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,a,x,y,z; cin>>p>>e>>i>>d; for(x=p;x<=21252;x+=23){ for(y=e;y<=21252;y+=28){ for(z=i;z<=21252;z+=33){ if(x==y&&y==z&&x==z){ a=z-d; cout<<"the next triple peak occurs in "<<a<<" days."; return 0; } } } } return 0; }