結果

問題 No.2110 012 Matching
ユーザー Mr.HarutaMr.Haruta
提出日時 2022-11-16 23:31:59
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 761 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 11,808 KB
実行使用メモリ 10,084 KB
最終ジャッジ日時 2023-10-17 20:47:45
合計ジャッジ時間 6,116 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,072 KB
testcase_01 AC 226 ms
10,084 KB
testcase_02 AC 508 ms
10,084 KB
testcase_03 AC 345 ms
10,084 KB
testcase_04 AC 669 ms
10,084 KB
testcase_05 AC 478 ms
10,084 KB
testcase_06 AC 461 ms
10,084 KB
testcase_07 AC 751 ms
10,084 KB
testcase_08 AC 52 ms
10,084 KB
testcase_09 AC 132 ms
10,084 KB
testcase_10 AC 761 ms
10,084 KB
testcase_11 AC 29 ms
10,072 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