結果

問題 No.2233 Average
ユーザー roarisroaris
提出日時 2023-03-03 23:52:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 81,652 KB
実行使用メモリ 75,732 KB
最終ジャッジ日時 2023-10-18 03:49:19
合計ジャッジ時間 3,253 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,492 KB
testcase_01 AC 38 ms
53,492 KB
testcase_02 AC 38 ms
53,492 KB
testcase_03 AC 39 ms
53,492 KB
testcase_04 AC 38 ms
53,492 KB
testcase_05 AC 38 ms
53,492 KB
testcase_06 AC 38 ms
53,492 KB
testcase_07 AC 42 ms
59,364 KB
testcase_08 AC 102 ms
75,688 KB
testcase_09 AC 120 ms
75,688 KB
testcase_10 AC 101 ms
75,648 KB
testcase_11 AC 101 ms
75,640 KB
testcase_12 AC 95 ms
75,648 KB
testcase_13 AC 63 ms
72,644 KB
testcase_14 AC 91 ms
75,652 KB
testcase_15 AC 102 ms
75,668 KB
testcase_16 AC 71 ms
75,636 KB
testcase_17 AC 72 ms
75,632 KB
testcase_18 AC 124 ms
75,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

for _ in range(int(input())):
    a, b, c, K = map(int, input().split())
    
    for _ in range(K):
        a, b, c = (b+c)//2, (c+a)//2, (a+b)//2
        
        if a==b==c:
            print(3*a)
            break
    else:
        print(a+b+c)
0