#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
int k;
cin >> k;
while(k --){
int n, m;
cin >> n >> m;
int t = min(n, m);
if(t == 1){
cout<<"0\n";
}
else{
int mxx = max(n, m);
if(n == m){
mxx ++;
}
cout <<mxx<<"\n";
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Incorrect |
3 ms |
508 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
564 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
564 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
564 KB |
Output isn't correct |
6 |
Incorrect |
64 ms |
1068 KB |
Output isn't correct |
7 |
Incorrect |
96 ms |
1804 KB |
Output isn't correct |
8 |
Incorrect |
71 ms |
2176 KB |
Output isn't correct |
9 |
Incorrect |
89 ms |
2836 KB |
Output isn't correct |
10 |
Incorrect |
59 ms |
3232 KB |
Output isn't correct |