結果

問題 No.2110 012 Matching
ユーザー KudeKude
提出日時 2022-10-28 21:34:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 374 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 900 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 78,972 KB
最終ジャッジ日時 2023-09-20 04:22:12
合計ジャッジ時間 4,911 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,420 KB
testcase_01 AC 188 ms
78,972 KB
testcase_02 AC 287 ms
78,392 KB
testcase_03 AC 231 ms
78,512 KB
testcase_04 AC 346 ms
78,644 KB
testcase_05 AC 277 ms
78,508 KB
testcase_06 AC 273 ms
78,628 KB
testcase_07 AC 374 ms
78,524 KB
testcase_08 AC 135 ms
78,548 KB
testcase_09 AC 159 ms
78,384 KB
testcase_10 AC 372 ms
78,760 KB
testcase_11 AC 76 ms
71,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    a, b, c = map(int, input().split())
    ans = 0
    t = b // 2
    ans += 2 * t
    b -= 2 * t
    t = min(a, c)
    ans += 2 * t
    c -= t
    a -= t
    t = c // 2
    ans += t
    c -= 2 * t
    t = min(a, b)
    ans += t
    a -= t
    b -= t
    print(ans)
0