結果

問題 No.2233 Average
ユーザー 👑 KazunKazun
提出日時 2023-03-03 21:28:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 520 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 79,872 KB
最終ジャッジ日時 2024-09-17 22:20:37
合計ジャッジ時間 2,856 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    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:
            return a+b+c
    return a+b+c

def greedy(A,B,C,K):
    print(0,A,B,C,A+B+C)
    for k in range(1,K+1):
        A,B,C=(B+C)//2,(C+A)//2,(A+B)//2
        print(k,A,B,C,A+B+C)
    return A,B,C

#==================================================
import sys
input=sys.stdin.readline
write=sys.stdout.write

T=int(input())
write("\n".join(map(str,[solve() for _ in range(T)])))
0