結果

問題 No.51 やる気の問題
ユーザー utsumidaisukeutsumidaisuke
提出日時 2018-12-13 10:52:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 621 ms / 5,000 ms
コード長 187 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 11,736 KB
実行使用メモリ 42,256 KB
最終ジャッジ日時 2023-10-25 09:09:05
合計ジャッジ時間 17,673 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 448 ms
42,256 KB
testcase_01 AC 454 ms
42,256 KB
testcase_02 AC 455 ms
42,256 KB
testcase_03 AC 466 ms
42,256 KB
testcase_04 AC 462 ms
42,252 KB
testcase_05 AC 574 ms
42,256 KB
testcase_06 AC 536 ms
42,252 KB
testcase_07 AC 533 ms
42,256 KB
testcase_08 AC 497 ms
42,252 KB
testcase_09 AC 619 ms
42,256 KB
testcase_10 AC 492 ms
42,252 KB
testcase_11 AC 503 ms
42,256 KB
testcase_12 AC 519 ms
42,256 KB
testcase_13 AC 533 ms
42,252 KB
testcase_14 AC 511 ms
42,256 KB
testcase_15 AC 594 ms
42,256 KB
testcase_16 AC 487 ms
42,256 KB
testcase_17 AC 460 ms
42,252 KB
testcase_18 AC 575 ms
42,256 KB
testcase_19 AC 587 ms
42,252 KB
testcase_20 AC 524 ms
42,256 KB
testcase_21 AC 455 ms
42,252 KB
testcase_22 AC 621 ms
42,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

w = int(input())
d = int(input())

cnt = 1
aw = []
while w > 0:
    wd = int(np.floor(w/(d**2)))
    w = w - wd
    aw.append(wd)
    d -= 1
    cnt += 1
print(aw[-1])
0