?? 1391 number steps.cpp
字號:
/*
1391 Number Steps
Time Limit : 1000 ms Memory Limit : 32768 K Output Limit : 256 K
GUN C++
*/
#include <iostream.h>
using namespace std;
int main()
{
int t,x,y,ca,sec,ans;
cin>>t;
for(ca=0;ca<t;ca++)
{
cin>>x>>y;
ans=-1;
if( (x==y) || (x==y+2) )
{
if( x%2==0 && y%2==0 )
ans=x+y;
else
ans=x+y-1;
}
if(ans<0)
cout<<"No Number\n";
else
cout<<ans<<endl;
}
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -