ZOJ 1414
2010-05-12 10:55
393 查看
#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;
}
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;
}
相关文章推荐
- ZOJ Problem Set - 1414||Number Steps
- zoj 1414 Number Steps
- zoj 1414 Number Steps
- ZOJ1414 Number Steps
- ZOJ 2850和ZOJ 1414
- ZOJ Problem Set–1414 Number Steps
- ZOJ1414 Number Steps
- ZOJ 1414 Number Steps
- ZOJ 2850和ZOJ 1414
- zoj 1414 Number Steps
- 【ACM打卡】ZOJ 1414 3100
- ZOJ 1414 Number Steps
- ZOJ1414题的解法
- zoj 1414 Number Steps(水~)
- ZOJ1414 POJ1663 Number Steps 很简单的找规律题
- zoj 1414
- ZOJ-1414
- ZOJ 1414:Number Steps
- ZOJ 1041(POJ 1106) Transmitters(…
- POJ 1469 && ZOJ 1140 --COURSES【二分图 && 最大匹配】