結果

問題 No.2110 012 Matching
ユーザー miya145592miya145592
提出日時 2023-05-04 06:56:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 225 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 86,840 KB
最終ジャッジ日時 2024-05-01 20:09:34
合計ジャッジ時間 4,840 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,584 KB
testcase_01 AC 134 ms
78,464 KB
testcase_02 AC 171 ms
83,328 KB
testcase_03 AC 163 ms
80,896 KB
testcase_04 AC 194 ms
85,888 KB
testcase_05 AC 176 ms
83,200 KB
testcase_06 AC 168 ms
82,720 KB
testcase_07 AC 225 ms
86,656 KB
testcase_08 AC 97 ms
76,800 KB
testcase_09 AC 117 ms
77,952 KB
testcase_10 AC 205 ms
86,840 KB
testcase_11 AC 39 ms
51,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
ABC = [list(map(int, input().split())) for _ in range(T)]
for a, b, c in ABC:
    ans = 0
    cnt = min(a, c)
    ans += cnt*2
    a-=cnt
    c-=cnt

    cnt = b//2
    ans += cnt*2
    b%=2

    cnt = c//2
    ans += cnt
    c%=2

    if a>0 and b>0:
        ans += 1
    print(ans)

0