結果

問題 No.2110 012 Matching
ユーザー 👑 tamatotamato
提出日時 2022-10-28 21:26:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 458 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 77,532 KB
最終ジャッジ日時 2023-09-20 04:09:01
合計ジャッジ時間 3,560 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,292 KB
testcase_01 AC 119 ms
77,348 KB
testcase_02 AC 144 ms
77,480 KB
testcase_03 AC 132 ms
77,228 KB
testcase_04 AC 158 ms
77,480 KB
testcase_05 AC 143 ms
77,172 KB
testcase_06 AC 142 ms
77,532 KB
testcase_07 AC 167 ms
77,480 KB
testcase_08 AC 101 ms
76,716 KB
testcase_09 AC 109 ms
77,436 KB
testcase_10 AC 171 ms
77,460 KB
testcase_11 AC 74 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline
    
    for _ in range(int(input())):
        a, b, c = map(int, input().split())
        ans = 0
        ans += (b // 2) * 2
        b %= 2
        x = min(a, c)
        ans += 2 * x
        a -= x
        c -= x
        y = min(a, b)
        ans += y
        a -= y
        b -= y
        ans += (c // 2)
        c %= 2
        print(ans)


if __name__ == '__main__':
    main()
0