結果

問題 No.2233 Average
ユーザー satama6satama6
提出日時 2023-03-03 21:33:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 290 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 1,285 ms
コンパイル使用メモリ 81,496 KB
実行使用メモリ 75,732 KB
最終ジャッジ日時 2023-10-18 01:28:15
合計ジャッジ時間 3,907 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 37 ms
53,332 KB
testcase_02 AC 38 ms
53,332 KB
testcase_03 AC 38 ms
53,332 KB
testcase_04 AC 40 ms
53,332 KB
testcase_05 AC 40 ms
53,332 KB
testcase_06 AC 39 ms
53,332 KB
testcase_07 AC 44 ms
59,224 KB
testcase_08 AC 210 ms
75,732 KB
testcase_09 AC 271 ms
75,680 KB
testcase_10 AC 186 ms
75,684 KB
testcase_11 AC 192 ms
75,692 KB
testcase_12 AC 169 ms
75,676 KB
testcase_13 AC 89 ms
75,684 KB
testcase_14 AC 177 ms
75,680 KB
testcase_15 AC 217 ms
75,688 KB
testcase_16 AC 105 ms
75,680 KB
testcase_17 AC 117 ms
75,680 KB
testcase_18 AC 290 ms
75,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

def func(a, b, c):
    ra = (b + c) // 2
    rb = (a + c) // 2
    rc = (b + a) // 2
    return ra, rb, rc


while T:
    T -= 1
    a, b, c, K = map(int, input().split())

    while K:
        K -= 1
        a, b, c = func(a, b, c)
        if a == b == c : break
    
    print(a + b + c)
0