結果

問題 No.2110 012 Matching
コンテスト
ユーザー 👑 Kazun
提出日時 2022-10-28 21:39:11
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 354 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 392 ms
コンパイル使用メモリ 85,216 KB
実行使用メモリ 87,476 KB
最終ジャッジ日時 2026-03-27 11:06:52
合計ジャッジ時間 1,799 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def solve():
    A,B,C=map(int,input().split())

    ans=0

    X=min(A,C); ans=2*X
    A-=X; C-=X
    ans+=2*(B//2); B%=2
    ans+=min(A,B)
    ans+=C//2

    return ans

#==================================================
import sys
input=sys.stdin.readline
write=sys.stdout.write

T=int(input())
write("\n".join(map(str,[solve() for _ in range(T)])))
0