| ||||||||||
| 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 | |||||||||
为什么这个程序老是提示wrong answer,偶觉得没有错呀!#include <stdio.h>
main()
{
int p,e,i,d;
int k=28*33*23;
int x,t=0;
scanf("%d %d %d %d",&p,&e,&i,&d);
while(p!=-1||e!=-1||i!=-1||d!=-1)
{
t=t+1;
for(x=1;x<=k;x++)
{if((x-p)%23==0&&(x-e)%28==0&&(x-i)%33==0)
printf("Case %d: the next triple peak occurs in %d days.\n",t,x-d);
}
scanf("%d %d %d %d",&p,&e,&i,&d);
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator