답안 #1025793

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1025793 2024-07-17T10:11:25 Z vjudge1 Košnja (COCI17_kosnja) C++17
50 / 50
67 ms 608 KB
#include <bits/stdc++.h>
using namespace std;

void solve(){
    int n, m;
    cin >> n >> m;

    if (min(n, m) % 2)
        cout << 4 * (min(n, m) / 2) << endl;
    else
        cout << 4 * (min(n, m) / 2) - 2 << endl; 
}

int main(){
    int t;
    cin >> t;

    while (t--)
        solve();
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 43 ms 468 KB Output is correct
7 Correct 66 ms 608 KB Output is correct
8 Correct 46 ms 592 KB Output is correct
9 Correct 67 ms 592 KB Output is correct
10 Correct 60 ms 592 KB Output is correct