結果

問題 No.2110 012 Matching
ユーザー 👑 H20H20
提出日時 2022-10-28 21:33:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 374 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 78,864 KB
最終ジャッジ日時 2023-09-20 04:21:21
合計ジャッジ時間 4,655 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,172 KB
testcase_01 AC 181 ms
78,468 KB
testcase_02 AC 285 ms
78,648 KB
testcase_03 AC 229 ms
78,768 KB
testcase_04 AC 338 ms
78,628 KB
testcase_05 AC 273 ms
78,864 KB
testcase_06 AC 274 ms
78,440 KB
testcase_07 AC 374 ms
78,760 KB
testcase_08 AC 133 ms
78,388 KB
testcase_09 AC 160 ms
78,380 KB
testcase_10 AC 373 ms
78,628 KB
testcase_11 AC 73 ms
71,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    A,B,C = map(int, input().split())
    ans = 0
    minAC = min(A,C)
    ans += minAC*2
    A-=minAC
    C-=minAC
    pairB = B//2
    ans += pairB*2
    B-=pairB*2
    pairC = C//2
    ans += pairC
    C-=pairC*2
    minAB = min(A,B)
    ans += minAB
    B-=minAB
    A-=minAB
    print(ans)
0