Number Steps
Given below code is for nsteps spoj or number steps spoj.
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int x , y;
cin>>x>>y;
if(y > x or y < (x - 2) or y == x - 1){
cout<<"No Number\n";
continue;
}
if( (x&1) && (y&1)){ // ((x&1) is true when x is odd
cout<<x+y-1<<endl;
continue;
}
cout<<x+y<<endl;
}
return 0;
}
Good information about the blog, Love Vashikaran Specialist Astrologer in India, USA, UK, Canada To Solve Your All Life Problems. Consult on WhatsApp or Call +91-7297013772
ReplyDeleteBlack Magic Specialists
Love Spells Specialists
Husband Wife Problem Solutions
Love Problem Solutions
Love Vashikaran Specialists
Vashikaran Specialists
Love Marriage Specialists