結果

問題 No.2110 012 Matching
ユーザー dachengzdachengz
提出日時 2022-11-16 10:13:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 360 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 1,885 ms
コンパイル使用メモリ 81,620 KB
実行使用メモリ 76,316 KB
最終ジャッジ日時 2023-10-17 09:01:54
合計ジャッジ時間 6,610 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,372 KB
testcase_01 AC 162 ms
76,264 KB
testcase_02 AC 270 ms
76,228 KB
testcase_03 AC 214 ms
76,196 KB
testcase_04 AC 330 ms
76,296 KB
testcase_05 AC 261 ms
76,316 KB
testcase_06 AC 257 ms
76,300 KB
testcase_07 AC 358 ms
76,204 KB
testcase_08 AC 109 ms
76,156 KB
testcase_09 AC 137 ms
76,140 KB
testcase_10 AC 360 ms
76,264 KB
testcase_11 AC 38 ms
53,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    A, B, C = map(int, input().split())
    ret = min(A, C)
    A -= ret
    C -= ret
    ret = 2 * (ret + B // 2)
    if B & 1:
        if C:
            ret += C // 2
        if A:
            ret += 1
    else:
        if C:
            ret += C // 2
    print(ret)
0