标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4482 Accepted Submission(s):
2732
1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 int main() 5 { 6 int x,y; 7 int T; 8 cin>>T; 9 while(T--) 10 { 11 cin>>x>>y; 12 if(x-y==0||x-y==2) 13 { 14 if(x-y==0) 15 { 16 if(x%2==0) 17 cout<<2*x<<endl; 18 else 19 cout<<2*x-1<<endl; 20 } 21 else 22 { 23 if(x%2==0) 24 cout<<x+y<<endl; 25 else 26 cout<<x+y-1<<endl; 27 } 28 } 29 else 30 printf("No Number\n"); 31 } 32 }
标签:
原文地址:http://www.cnblogs.com/a1225234/p/4683029.html