n=int(input())
L=[]
for i in range(n):
x,y=map(int,input().split())
L+=[x<y and 2*(x-1) or x>=y and 2*(y-1) or 0]
for i in range(n):
print(L[i])
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
3428 KB |
Output is correct |
2 |
Correct |
27 ms |
3300 KB |
Output is correct |
3 |
Correct |
26 ms |
3300 KB |
Output is correct |
4 |
Correct |
25 ms |
3300 KB |
Output is correct |
5 |
Correct |
26 ms |
3300 KB |
Output is correct |
6 |
Correct |
196 ms |
5440 KB |
Output is correct |
7 |
Correct |
242 ms |
6332 KB |
Output is correct |
8 |
Correct |
178 ms |
5476 KB |
Output is correct |
9 |
Correct |
247 ms |
6400 KB |
Output is correct |
10 |
Correct |
174 ms |
5520 KB |
Output is correct |