| ||||||||||
| 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>
#include <math.h>
void main()
{
int a,b,c,d,x,y,i;
for (i=1;;i++)
{
scanf("%d%d%d%d",&a,&b,&c,&d);
if (a==-1&&b==-1&&c==-1&&d==-1) break;
else {for (x=1;;x++)
if (x%23==a%23) break;
for (y=x;;y+=23)
if (y%28==b%28) break;
for (x=y;;x+=644)
if (x%33==c%33) break;
printf("Case %d: the next triple peak occurs in %d days.\n",i,x-d);
}
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator