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