| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
注意,找到一个WA了N次的重要原因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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator