#include <bits/stdc++.h>
using namespace std;
int main()
{
int k;
cin>>k;
while (k--)
{
int n,m;
cin>>n>>m;
cout<<(min(n,m)-1)*2<<endl;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
62 ms |
876 KB |
Output is correct |
7 |
Correct |
66 ms |
1108 KB |
Output is correct |
8 |
Correct |
46 ms |
856 KB |
Output is correct |
9 |
Correct |
66 ms |
1160 KB |
Output is correct |
10 |
Correct |
44 ms |
860 KB |
Output is correct |