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(void) { int p,e,i,d,n = 0,days; scanf("%d %d %d %d",&p,&e,&i,&d); while(p != -1 && e != -1 && i != -1 && d !=-1) { n++; while((p != e) || (p != i)) { if(p < e) { p += 23; } else if(e < i){ e += 28; } else { i += 33; } } days = p - d; if(days <= 0) { days += 21252; } printf("Case %d: the next triple peak occurs in %d days.\n",n,days); scanf("%d %d %d %d",&p,&e,&i,&d); } } 自己的机器没有问题,这里怎么会wa啊? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator