結果

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

ソースコード

diff #
プレゼンテーションモードにする

import sys
import os
import inspect
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 18
if os.getenv("TKTKLOCAL", False):
def debug(*arg, sep=" ", end="\n"):
print(*arg, sep=sep, end=end, file=sys.stderr)
def debug_indent(*arg, sep=" ", end="\n", indent=" "):
frame = inspect.currentframe().f_back
par_func = inspect.getframeinfo(frame).function
if par_func == "<module>":
debug(*arg, sep=sep, end=end)
return
frame_stack = inspect.stack()
if len(frame_stack) > 30:
return
depth = sum(f.function == par_func for f in frame_stack)
debug(indent * (depth - 1), end="")
debug(*arg, sep=sep, end=end)
else:
def debug(*arg, **kwarg):
pass
def debug_indent(*arg, **kwarg):
pass
def f(x, y):
return (x + y) // 2
def solve():
a, b, c, K = map(int, input().split())
if a == b == c:
print(3 * a)
return
for _ in range(K):
na, nb, nc = f(b, c), f(a, c), f(a, b)
if (a, b, c) == (na, nb, nc):
break
a, b, c = na, nb, nc
print(a + b + c)
T = int(input())
for _ in range(T):
solve()
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0