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 |
各路高手 帮忙看看吧 结果一样的 却是AC#include <stdio.h> int main() { int p,e,i,d,m,j; scanf("%d%d%d%d",&p,&e,&i,&d); m=0; while(p>=0&&e>=0&&i>=0&&d>=0) { for(j=0;p<=21252;j++) { p=p+23; if((p-e)%28==0&&(p-i)%33==0) break; } m++; printf("Case %d: the next triple peak occurs in %d days.\n",m,p-d); scanf("%d%d%d%d",&p,&e,&i,&d); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator