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