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了N次的重要原因

Posted by 1428 at 2008-04-17 18:41:21 on Problem 1663
No Number写成了No number
还真的很隐蔽呢!


#include <iostream>

using namespace std;

long t,x,y;

int main ()
{
    cin>>t;
    while (t--)
          {
          cin>>x>>y;
          temp=-1;
          if (x==y) {
                    if (x%2==0) cout<<x*2<<endl;
                                else cout<<x*2-1<<endl;
                    }
                    else {
                         if (x==y+2) {
                                     if (x%2==0) cout<<x*2-2<<endl;
                                                 else cout<<x*2-3<<endl;
                                     }
                                     else cout<<"No Number"<<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