結果

問題 No.2110 012 Matching
コンテスト
ユーザー ntuda
提出日時 2025-02-11 19:42:17
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 227 ms / 2,000 ms
コード長 297 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,468 ms
コンパイル使用メモリ 84,736 KB
実行使用メモリ 81,664 KB
最終ジャッジ日時 2026-06-30 02:52:30
合計ジャッジ時間 5,681 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

    x = b // 2
    ans += x * 2
    b -= x * 2

    x = min(a,b)
    ans += x
    a -= x
    b -= x

    x = c // 2
    ans += x
    c -= 2 * x

    print(ans)
0