#include <iostream>
using namespace std;
int main(){
int k, m, n;
cin >> k;
int sol[k];
for(int i = 0; i < k; i++){
cin >> m >> n;
if(m == 1 or n == 1){
sol[i] = 0;
}
else if(m < n){
sol[i] = m*2;
}
else{
sol[i] = n*2;
}
}
for(int i = 0; i < k; i++){
cout << sol[i] << endl;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
6 |
Incorrect |
117 ms |
720 KB |
Output isn't correct |
7 |
Incorrect |
176 ms |
888 KB |
Output isn't correct |
8 |
Incorrect |
121 ms |
888 KB |
Output isn't correct |
9 |
Incorrect |
179 ms |
936 KB |
Output isn't correct |
10 |
Incorrect |
120 ms |
596 KB |
Output isn't correct |