結果

問題 No.2110 012 Matching
ユーザー ikomaikoma
提出日時 2022-10-28 21:37:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 187 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 837 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 78,296 KB
最終ジャッジ日時 2023-09-20 04:26:34
合計ジャッジ時間 3,895 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,324 KB
testcase_01 AC 132 ms
78,076 KB
testcase_02 AC 157 ms
78,144 KB
testcase_03 AC 142 ms
78,248 KB
testcase_04 AC 167 ms
78,296 KB
testcase_05 AC 149 ms
77,820 KB
testcase_06 AC 149 ms
77,904 KB
testcase_07 AC 176 ms
78,152 KB
testcase_08 AC 109 ms
77,856 KB
testcase_09 AC 119 ms
77,648 KB
testcase_10 AC 187 ms
78,056 KB
testcase_11 AC 75 ms
71,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
T=int(input())

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