#include<stdio.h>
int main()
{
int p[100],e[100],i[100],d[100];
int m,n,k,s,t=0,w;
for(m=0;t<1;m++)
{
scanf("%d %d %d %d",&p[m],&e[m],&i[m],&d[m]);
if(p[m]==-1&&e[m]==-1&&i[m]==-1&&d[m]==-1)t=1;
}
for(n=0;n<m-1;n++)
{ s=0;
for(k=0;s==0;k++){
w=p[n]+23*k;
if((w-e[n])%28==0&&(w-i[n])%33==0&&w>d[n]){
printf("Case %d: the next triple peak occurs in %d days.\n",n+1,w-d[n]);
s=1;
}
}
}
return 0;
}
Biorhythms
最新推荐文章于 2020-01-13 22:33:39 发布