Run ID:139407
提交时间:2025-12-06 16:19:16
#include<bits/stdc++.h> using namespace std; long long p,e,i,d,o=0,q; bool t=0,g=0,z=0; int main(){ scanf("%lld%lld%lld%lld",&p,&e,&q,&d); for(int i=d;o==0;i++){ if((i-p)%23==0){ t=1; } else{ t=0; } if((i-e)%28==0){ g=1; } else{ g=0; } if((i-q)%33==0){ z=1; } else{ z=0; } if(t&&g&&z){ o=1; printf("the next triple peak occurs in %lld days.",i-d); } } return 0; }