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

各位大侠看下我哪里错了??谢谢

Posted by nemo_zj at 2009-03-09 21:05:57 on Problem 1006
#include<stdio.h>
int main(void)
{
  int p,e,i,d,n,m,l;
  int x,cycle;
   m=1;
   while((scanf("%d %d %d %d",&p,&e,&i,&d))!=EOF)
{
    if(p==-1&&e==-1&&i==-1&&d==-1)
        break;

    for(x=1;x<21252;x++)
    if((x%23==p)&&(x%28==e)&&(x%33==i))break;
    cycle=x-d;
    printf("Case %d: the next triple peak occurs in %d days." ,m++,cycle);
}

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