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

这个为什么WA啊!

Posted by CQQ at 2005-12-13 22:53:26 on Problem 1006
#include<stdio.h>
int main(){
 long m ,count=0;
 long a,b,c,d;
 while(1){
   count++;
   scanf("%d%d%d%d",&a,&b,&c,&d);
   if(a == -1){
      break;
   }
   int br = 1;
   for(m = 0 ;br;m++){
      int t = 33*m +a;
      if((t-a)%23==0 && (t-b)%28 ==0 && t>d){
        printf("Case %d: the next triple peak occurs in %d days.\n",count,t-d);
        br = 0;
      }
   }
}
 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