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

这个哪里错了啊?~~~ 测试都没有问题的阿~~竟然告诉我 Wrong Answer

Posted by ale at 2004-04-04 10:38:00 on Problem 1006
#include <iostream>
#include <vector>
using namespace std;

int main()
{
   vector<int> days;
   int a, b, c, d, x, y, i = 0;
   while(++i){
      cin >> a >> b >> c >> d;
      if(a == b && b == c && c == d && d == -1)
         break;
      x = y = 1;
      while(((23 * x - b + a) % 28))
         ++x;
      while(((23 * 28 * y + 23 * x - c + a) % 33))
         ++y;
      days.push_back(23 * 28 * y + 23 * x - d + a);
   }
   for(int j = 0; j < i - 1; j++)
      cout << "Case " << j + 1 << ": the next triple peak occurs in "
           << days[j] << " days." << endl;
}

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