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

水题贴个水代码。。。5000的问题不做评价。。。

Posted by HJWAJ at 2010-07-13 11:20:34 on Problem 1663
#include<iostream>
using namespace std;

int main()
{
    int n,a,b; 
    cin>>n;
    for(int i=0;i<n;i++)
     {  
        cin>>a>>b;
        
        if(a!=b && a!=b+2)cout<<"No Number"<<endl;
        else 
        {
             if(a%2==0)cout<<a+b<<endl;
             else cout<<a+b-1<<endl;
        }
    }
        
    
    system("pause");
    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