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