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,请高手帮忙看看,谢谢!!!

Posted by cy_forever at 2008-06-02 11:29:31 on Problem 1006
#include <iostream>
using namespace std;

int main()
{
    int p,e,i,d;
    int peakday[100];
    int cnt=0;

    int n;

    cin>>p>>e>>i>>d;
    n=i;
    while (!(p==-1 &&e==-1 &&i==-1 && d==-1))
    {
        n+=33;
        if ((n-e)%28==0 && (n-p)%23==0)
        {
            peakday[cnt++]=n-d;
            cin>>p>>e>>i>>d;
            n=i;
        }
    }
    for (i=0; i<cnt; i++)
    {
        cout<<"Case "<<i+1<<": the next triple peak occurs in "<<(peakday[i]%21252==0?21252:(peakday[i]%21252))<<" days."<<endl;
    }

    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