結果
問題 | No.2233 Average |
ユーザー |
![]() |
提出日時 | 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 |
ソースコード
import sysimport osimport inspectinput = sys.stdin.buffer.readlinesys.setrecursionlimit(10 ** 7)inf = 10 ** 18if 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_backpar_func = inspect.getframeinfo(frame).functionif par_func == "<module>":debug(*arg, sep=sep, end=end)returnframe_stack = inspect.stack()if len(frame_stack) > 30:returndepth = 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):passdef debug_indent(*arg, **kwarg):passdef f(x, y):return (x + y) // 2def solve():a, b, c, K = map(int, input().split())if a == b == c:print(3 * a)returnfor _ in range(K):na, nb, nc = f(b, c), f(a, c), f(a, b)if (a, b, c) == (na, nb, nc):breaka, b, c = na, nb, ncprint(a + b + c)T = int(input())for _ in range(T):solve()