結果

問題 No.2416 vs Slime
ユーザー 👑 KA37RIKA37RI
提出日時 2023-08-12 14:02:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 240 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 21,632 KB
最終ジャッジ日時 2024-11-19 17:07:23
合計ジャッジ時間 26,110 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1
other WA * 18 RE * 13 TLE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

H, A = [int(x) for x in input().split()]
slimes = {H: 1}
ans = 0
nxt = {}
while slimes:
  for s in slimes:
    at = s // A
    if at > 0:
      if at not in nxt: nxt[at] = 0
      nxt[at] += slimes[s] * 2
    ans += slimes[s]
  slimes = nxt
0