| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
不知错了那里,请高手指出,谢谢
#include "Stdio.h"
main()
{ int i,ii;
int a,b,c,d;
int aa,bb,cc;
ii=0;
scanf("%d %d %d %d",&a,&b,&c,&d);
while(a!=-1||b!=-1||c!=-1||d!=-1)
{ii++;
aa=0;
bb=0;
cc=0;
if(a!=b||b!=c)
{aa=23-a%23;
bb=(a%23-b-23+28)%28;
cc=(a%23-c-23+33)%33;}
i=0;
while(bb!=0||cc!=0)
{i+=23;
bb=(bb<23)? bb+5:bb-23;
cc=(cc<23)? cc+10:cc-23;
}
printf("Case %d: the next triple peak occurs in %d days.\n",ii,(21252-i-d-aa));
scanf("%d %d %d %d",&a,&b,&c,&d);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator