結果

問題 No.2110 012 Matching
ユーザー ShirotsumeShirotsume
提出日時 2022-10-28 21:52:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 86,920 KB
実行使用メモリ 77,848 KB
最終ジャッジ日時 2023-09-20 04:47:21
合計ジャッジ時間 3,563 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,492 KB
testcase_01 AC 118 ms
77,436 KB
testcase_02 AC 146 ms
77,476 KB
testcase_03 AC 133 ms
77,344 KB
testcase_04 AC 162 ms
77,248 KB
testcase_05 AC 143 ms
77,848 KB
testcase_06 AC 141 ms
77,420 KB
testcase_07 AC 171 ms
77,464 KB
testcase_08 AC 106 ms
77,332 KB
testcase_09 AC 114 ms
77,392 KB
testcase_10 AC 170 ms
77,420 KB
testcase_11 AC 73 ms
71,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

for _ in range(ii()):
    a, b, c = mi()
    ans = 0
    two = min(a, c)
    a -= two
    c -= two
    ans += 2 * two
    two = b // 2
    b -= 2 * two
    ans += 2 * two
    one = c // 2
    c -= 2 * one
    ans += one
    ans += min(a, b)
    print(ans)
0