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