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 |
为什么总是WrongAnswer啊!!我测试明明都对#include"stdio.h" int Num_p,p,e,i,d,Rlt,Case; void main(){ for (Case=1;Case<123412341;Case++) {scanf("%d %d %d %d",&p,&e,&i,&d); if ((p==-1&&e==-1&&i==-1&&d==-1)==1) break; else {for(Num_p=1;Num_p<=28*33;Num_p++) { if(((p+Num_p*23-e)%28==0&&(p+Num_p*23-i)%33==0)==1) break;} } Rlt=21252-(21252-Num_p*23-p)-d; printf("Case %d: the next triple peak occurs in %d days.\n",Case,Rlt); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator