結果

問題 No.2110 012 Matching
ユーザー shirokumashirokuma
提出日時 2022-10-30 02:44:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 356 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 78,900 KB
最終ジャッジ日時 2023-09-21 03:39:40
合計ジャッジ時間 4,697 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,200 KB
testcase_01 AC 175 ms
78,604 KB
testcase_02 AC 272 ms
78,572 KB
testcase_03 AC 224 ms
78,448 KB
testcase_04 AC 329 ms
78,444 KB
testcase_05 AC 269 ms
78,812 KB
testcase_06 AC 261 ms
78,900 KB
testcase_07 AC 349 ms
78,836 KB
testcase_08 AC 126 ms
78,428 KB
testcase_09 AC 151 ms
78,116 KB
testcase_10 AC 356 ms
78,740 KB
testcase_11 AC 72 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki2110
T = int(input())
def sol(a, b, c):
    res = 0
    res += min(a,c)*2
    res += 2*(b//2)
    b %= 2
    m = min(a,c)
    a -= m
    c -= m
    if a > 0:
        res += b
    if c > 0:
        res += c//2
    return res
for _ in range(T):
    a, b, c = map(int, input().split())
    print(sol(a,b,c))
0