結果

問題 No.2110 012 Matching
ユーザー 👑 KazunKazun
提出日時 2022-10-28 21:39:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 354 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 83,612 KB
最終ジャッジ日時 2023-09-20 04:29:18
合計ジャッジ時間 3,308 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,200 KB
testcase_01 AC 106 ms
78,784 KB
testcase_02 AC 125 ms
81,412 KB
testcase_03 AC 116 ms
79,816 KB
testcase_04 AC 141 ms
82,772 KB
testcase_05 AC 128 ms
81,320 KB
testcase_06 AC 126 ms
80,928 KB
testcase_07 AC 148 ms
83,612 KB
testcase_08 AC 93 ms
76,740 KB
testcase_09 AC 101 ms
77,856 KB
testcase_10 AC 154 ms
83,584 KB
testcase_11 AC 79 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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