結果

問題 No.2233 Average
ユーザー lloyzlloyz
提出日時 2023-03-03 23:45:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 352 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 81,744 KB
実行使用メモリ 75,808 KB
最終ジャッジ日時 2023-10-18 03:47:17
合計ジャッジ時間 4,470 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,428 KB
testcase_01 AC 38 ms
53,428 KB
testcase_02 AC 39 ms
53,428 KB
testcase_03 AC 39 ms
53,428 KB
testcase_04 AC 39 ms
53,428 KB
testcase_05 AC 39 ms
53,428 KB
testcase_06 AC 39 ms
53,428 KB
testcase_07 AC 46 ms
59,444 KB
testcase_08 AC 232 ms
75,796 KB
testcase_09 AC 323 ms
75,800 KB
testcase_10 AC 234 ms
75,796 KB
testcase_11 AC 224 ms
75,796 KB
testcase_12 AC 204 ms
75,796 KB
testcase_13 AC 100 ms
75,784 KB
testcase_14 AC 206 ms
75,792 KB
testcase_15 AC 258 ms
75,792 KB
testcase_16 AC 123 ms
75,788 KB
testcase_17 AC 138 ms
75,792 KB
testcase_18 AC 352 ms
75,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    a, b, c, k = map(int, input().split())
    L = [a, b, c]
    L.sort()
    while k > 0 and not (L[0] == L[1] == L[2]):
        L = [(L[0] + L[1]) // 2, (L[0] + L[2]) // 2, (L[1] + L[2]) // 2]
        k -= 1
    print(sum(L))
0