| ||||||||||
| 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 | |||||||||
1006测试数据都通过了,怎么不对?#include<stdio.h>
int main()
{
int d1,d2,d3,d4;
int n1,n3,i=1;
int x,z;
int fin;
scanf("%d %d %d %d",&d1,&d2,&d3,&d4);
while(d1!=-1||d2!=-1||d3!=-1)
{
n1=d2-d1;
n3=d3-d1;
x=1;
while((n1-23*x)%28!=0)
{
x++;
}
z=1;
while((n3-23*x+33*z)%644!=0)
{
z++;
}
fin=33*z+n3+d1-d4;
printf("Case %d: the next triple peak occurs in %d days.\n",i,fin);
scanf("%d %d %d %d",&d1,&d2,&d3,&d4);
i++;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator