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

sample对了,为什么就不能WA呢?

Posted by c0500448242 at 2005-07-22 09:46:59 on Problem 1006
In Reply To:各位大侠,江湖救急,为什么sample对了,但是是wa呢? Posted by:nan at 2005-07-22 09:40:10
> 
> 
> #include "Stdio.h"
> 
> int main()
> {
>   int p,e,i,d,k=0,day;
>   do
>   {
>     scanf("%d%d%d%d",&p,&e,&i,&d);
>     k++;
>     if (p!=-1 && e!=-1 && i!=-1 && d!=-1)
>     for(day=23;day<=21252;day++)
>       {
>          p=p%23;e=e%28;i=i%33;
>          if (day%23==p && day%28==e && day%33==i)
>            if (day-d>0)
>            printf("Case %d: the next triple peak occurs in %d\n days.",k,day-d);
>       }
> 
>   }
>   while (p!=-1 && e!=-1 && i!=-1 && d!=-1);
> }

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