Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:各路高手 帮忙看看吧 结果一样的 却是wc   

Posted by youyou at 2007-07-24 10:24:29 on Problem 1006
In Reply To:各路高手 帮忙看看吧 结果一样的 却是AC    Posted by:youyou at 2007-07-24 09:58:39
> #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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator