답안 #200924

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
200924 2020-02-08T15:09:49 Z SamAnd Košnja (COCI17_kosnja) C++17
50 / 50
25 ms 1272 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int tt;
    scanf("%d", &tt);
    while (tt--)
    {
        int n, m;
        scanf("%d%d", &n, &m);
        printf("%d\n", min(n, m) * 2 - 2);
    }
    return 0;
}

Compilation message

kosnja.cpp: In function 'int main()':
kosnja.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &tt);
     ~~~~~^~~~~~~~~~~
kosnja.cpp:11:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d", &n, &m);
         ~~~~~^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
4 Correct 5 ms 376 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 19 ms 888 KB Output is correct
7 Correct 25 ms 1272 KB Output is correct
8 Correct 18 ms 1016 KB Output is correct
9 Correct 25 ms 1272 KB Output is correct
10 Correct 18 ms 1016 KB Output is correct