-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathnsteps.cpp
More file actions
41 lines (34 loc) · 734 Bytes
/
nsteps.cpp
File metadata and controls
41 lines (34 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define inf 1000000000
#define MAXN 100000
using namespace std;
int main() {
int t;
scanf("%d", &t);
for (int qwertz = 0; qwertz < t; ++qwertz) {
int x, y;
scanf("%d%d", &y, &x);
if (x != y && x+2 != y) { printf("No Number\n"); continue; }
if (x%2 == 0) {
printf("%d\n", x+y);
} else {
printf("%d\n", x+y-1);
}
}
return 0;
}