結果

問題 No.2110 012 Matching
ユーザー helloprahellopra
提出日時 2022-10-28 23:16:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 372 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 1,097 ms
コンパイル使用メモリ 86,636 KB
実行使用メモリ 78,704 KB
最終ジャッジ日時 2023-09-20 06:30:38
合計ジャッジ時間 5,718 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
70,892 KB
testcase_01 AC 203 ms
78,572 KB
testcase_02 AC 288 ms
78,504 KB
testcase_03 AC 235 ms
78,436 KB
testcase_04 AC 345 ms
78,692 KB
testcase_05 AC 279 ms
78,392 KB
testcase_06 AC 280 ms
78,704 KB
testcase_07 AC 370 ms
78,512 KB
testcase_08 AC 135 ms
78,304 KB
testcase_09 AC 160 ms
78,348 KB
testcase_10 AC 372 ms
78,220 KB
testcase_11 AC 76 ms
71,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q = int(input())
for i in range(Q):
    A,B,C = map(int,input().split())
    ans = 0

    ac = min(A,C)
    ans += ac*2
    A-=ac;C-=ac
    

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

    print(ans)
0