#include <bits/stdc++.h>
using namespace std;
int main () {
int y,m,n,sum;
cin >> y;
for (int i=0;i<y;i++) {
cin >> n >> m;
if (n==1 || m==1) {
cout<< 0 << endl;
} else if (n<4 || m<4) {
cout << 4 << endl;
} else if (n>4 || m>4) {
sum=max(n,m);
cout << sum;
} else {
cout << 0;
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
6 |
Incorrect |
87 ms |
492 KB |
Output isn't correct |
7 |
Incorrect |
132 ms |
620 KB |
Output isn't correct |
8 |
Incorrect |
96 ms |
492 KB |
Output isn't correct |
9 |
Incorrect |
135 ms |
620 KB |
Output isn't correct |
10 |
Incorrect |
92 ms |
620 KB |
Output isn't correct |