結果

問題 No.2110 012 Matching
ユーザー roarisroaris
提出日時 2022-10-28 21:43:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 194 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 86,692 KB
実行使用メモリ 78,080 KB
最終ジャッジ日時 2023-09-20 04:35:28
合計ジャッジ時間 3,841 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,484 KB
testcase_01 AC 145 ms
77,952 KB
testcase_02 AC 170 ms
77,872 KB
testcase_03 AC 155 ms
78,064 KB
testcase_04 AC 183 ms
77,996 KB
testcase_05 AC 168 ms
78,000 KB
testcase_06 AC 167 ms
77,928 KB
testcase_07 AC 189 ms
78,080 KB
testcase_08 AC 130 ms
77,892 KB
testcase_09 AC 139 ms
77,908 KB
testcase_10 AC 194 ms
78,036 KB
testcase_11 AC 98 ms
71,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

for _ in range(int(input())):
    A, B, C = map(int, input().split())
    cnt02 = min(A, C)
    ans = 2*cnt02
    A -= cnt02
    C -= cnt02
    ans += C//2
    ans += B//2*2
    
    if A>0 and B%2==1:
        ans += 1

    print(ans)
0