天天看點

ZOJ 1414

#include<iostream>

using namespace std;

int main()

{

    int out,n,x,y;

    cin>>n;

    while(n--)

    {

        cin>>x>>y;

        if(x==y||x-y==2)

        {

            if(x%2==0)

                out=x+y;

            else

                out=x+y-1;

            cout<<out<<endl;

        }

        else

            cout<<"No Number"<<endl;

    }

    return 0;

}

轉載于:https://www.cnblogs.com/VRS_technology/archive/2010/05/12/1733427.html