結果

問題 No.2110 012 Matching
ユーザー dangodango
提出日時 2023-06-25 21:42:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 355 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 87,384 KB
実行使用メモリ 78,968 KB
最終ジャッジ日時 2023-09-15 11:49:27
合計ジャッジ時間 5,393 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,320 KB
testcase_01 AC 182 ms
78,828 KB
testcase_02 AC 281 ms
78,600 KB
testcase_03 AC 226 ms
78,548 KB
testcase_04 AC 331 ms
78,592 KB
testcase_05 AC 266 ms
78,672 KB
testcase_06 AC 265 ms
78,484 KB
testcase_07 AC 355 ms
78,284 KB
testcase_08 AC 128 ms
78,484 KB
testcase_09 AC 152 ms
78,464 KB
testcase_10 AC 355 ms
78,968 KB
testcase_11 AC 73 ms
71,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    A, B, C = map(int, input().split())
    res = 0
    s = B // 2
    res += s * 2
    B -= s * 2
    t = min(A, C)
    res += t * 2
    A -= t
    C -= t
    u = C // 2
    res += u
    C -= u * 2
    v = min(A, B)
    res += v
    A -= v
    B -= v
    print(res)
0