結果

問題 No.2110 012 Matching
ユーザー kaichamakaichama
提出日時 2022-11-17 08:50:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 788 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 11,808 KB
実行使用メモリ 10,116 KB
最終ジャッジ日時 2023-10-19 02:24:34
合計ジャッジ時間 7,384 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,104 KB
testcase_01 AC 225 ms
10,116 KB
testcase_02 AC 511 ms
10,116 KB
testcase_03 AC 350 ms
10,116 KB
testcase_04 AC 679 ms
10,116 KB
testcase_05 AC 479 ms
10,116 KB
testcase_06 AC 473 ms
10,116 KB
testcase_07 AC 788 ms
10,116 KB
testcase_08 AC 53 ms
10,116 KB
testcase_09 AC 135 ms
10,116 KB
testcase_10 AC 760 ms
10,116 KB
testcase_11 AC 29 ms
10,104 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