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