結果

問題 No.2110 012 Matching
ユーザー 吉野吉野
提出日時 2022-11-16 15:39:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 512 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,548 KB
実行使用メモリ 76,176 KB
最終ジャッジ日時 2023-10-17 13:59:58
合計ジャッジ時間 8,421 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,236 KB
testcase_01 AC 344 ms
75,960 KB
testcase_02 AC 357 ms
76,164 KB
testcase_03 AC 236 ms
76,064 KB
testcase_04 AC 347 ms
76,164 KB
testcase_05 AC 265 ms
76,176 KB
testcase_06 AC 309 ms
76,104 KB
testcase_07 AC 512 ms
76,060 KB
testcase_08 AC 122 ms
76,028 KB
testcase_09 AC 133 ms
76,000 KB
testcase_10 AC 380 ms
76,124 KB
testcase_11 AC 38 ms
53,228 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