結果

問題 No.2416 vs Slime
ユーザー Kabocha13Kabocha13
提出日時 2023-08-12 14:12:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,640 KB
最終ジャッジ日時 2024-04-30 05:16:30
合計ジャッジ時間 5,576 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
16,640 KB
testcase_01 AC 33 ms
11,008 KB
testcase_02 AC 33 ms
11,008 KB
testcase_03 AC 33 ms
11,008 KB
testcase_04 AC 33 ms
11,008 KB
testcase_05 AC 36 ms
11,008 KB
testcase_06 AC 33 ms
11,008 KB
testcase_07 AC 33 ms
11,008 KB
testcase_08 AC 33 ms
11,008 KB
testcase_09 AC 34 ms
11,008 KB
testcase_10 AC 33 ms
11,008 KB
testcase_11 AC 34 ms
11,008 KB
testcase_12 AC 33 ms
11,008 KB
testcase_13 AC 34 ms
11,136 KB
testcase_14 AC 33 ms
11,008 KB
testcase_15 AC 33 ms
11,008 KB
testcase_16 AC 33 ms
11,136 KB
testcase_17 AC 34 ms
11,008 KB
testcase_18 AC 34 ms
11,008 KB
testcase_19 AC 33 ms
11,008 KB
testcase_20 AC 33 ms
11,008 KB
testcase_21 AC 32 ms
11,008 KB
testcase_22 AC 33 ms
11,008 KB
testcase_23 AC 33 ms
11,008 KB
testcase_24 AC 32 ms
11,008 KB
testcase_25 AC 33 ms
11,008 KB
testcase_26 AC 33 ms
11,008 KB
testcase_27 AC 33 ms
11,136 KB
testcase_28 AC 63 ms
11,008 KB
testcase_29 TLE -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import queue

h,a = map(int,input().split())
sr = queue.LifoQueue()
sr.put(h)
ans = 0

while True:
  if sr.empty():
    print(ans)
    exit()
  else:
    h_now = sr.get()
    if h_now//a!=0:
      sr.put(h_now//a)
      sr.put(h_now//a)
    ans += 1
0