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 |
Re:帮我看看吧!谢谢了In Reply To:Re:帮我看看吧!谢谢了 Posted by:90401307 at 2004-11-29 15:13:26 > #include<stdio.h> > int main(){ > int a,b,c,d,p,i; > i=0; > scanf("%d%d%d%d",&a,&b,&c,&d); > while(a!=-1&&b!=-1&&c!=-1&&d!=-1){ > i++; > for(p=1;p<=21252;p++){ > if((p-a)%23==0&&(p-b)%28==0&&(p-c)%33==0) > printf("Case %d: the next triple peak occurs in %d days.\n",i,p-d); > } > scanf("%d%d%d%d",&a,&b,&c,&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