| ||||||||||
| 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:结果完全正确,可为什么不能AC呢?大家帮帮忙,看一下In Reply To:结果完全正确,可为什么不能AC呢?大家帮帮忙,看一下 Posted by:390738878 at 2009-07-17 10:59:12 > #include <stdio.h>
> void main()
> {
> int n,a,b,c,j;
> int p,e,i,d;
> for (j=1;;j++)
> {
> scanf("%d%d%d%d",&p,&e,&i,&d);
> if (p==-1 && e==-1 && i==-1 && d==-1)
> break;
> for(n=21252;;n--)
> {
> a=(n-p)%23;
> b=(n-e)%28;
> c=(n-i)%33;
> if(a==0 && b==0 && c==0)
> {
> printf("Case %d: the next triple peak occurs in %d days.\n",j,n-d);
> break;
> }
> }
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator