結果

問題 No.2110 012 Matching
ユーザー SidewaysOwlSidewaysOwl
提出日時 2022-10-28 22:57:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 369 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 1,057 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 78,820 KB
最終ジャッジ日時 2023-09-20 06:09:43
合計ジャッジ時間 4,784 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,052 KB
testcase_01 AC 183 ms
78,684 KB
testcase_02 AC 284 ms
78,484 KB
testcase_03 AC 231 ms
78,584 KB
testcase_04 AC 339 ms
78,820 KB
testcase_05 AC 277 ms
78,476 KB
testcase_06 AC 266 ms
78,708 KB
testcase_07 AC 365 ms
78,504 KB
testcase_08 AC 128 ms
78,300 KB
testcase_09 AC 154 ms
77,996 KB
testcase_10 AC 369 ms
78,704 KB
testcase_11 AC 74 ms
71,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for i in range(t):
    c,a,b = map(int,input().split())
    res = 0
    res = a//2 * 2
    a -= a//2 * 2
    min_bc = min(b,c)
    res += min_bc * 2
    b -= min_bc
    c -= min_bc
    if b:res += b//2
    if c:res += min(a,c)
    print(res)
#     print(a,b,c)
0