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 |
新手求救!! 哪错了啊。。。#include <iostream> using namespace std; int main() { int N; cin>>N; for( int m = 0; m < N; m++ ) { int x, y; cin>>x>>y; if( x>=0 && x<5001 && y>=0 && y<5001 ) { if( x==y || x-y == 2) { if( x%2 == 0 ) { cout<<x+y<<endl; } else { cout<<x+y-1<<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