結果

問題 No.1581 Multiple Sequence
ユーザー atcoder8atcoder8
提出日時 2023-03-31 22:04:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 81,624 KB
実行使用メモリ 64,696 KB
最終ジャッジ日時 2023-10-24 08:03:54
合計ジャッジ時間 2,768 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,280 KB
testcase_01 AC 37 ms
53,280 KB
testcase_02 AC 51 ms
64,560 KB
testcase_03 AC 52 ms
64,612 KB
testcase_04 AC 47 ms
62,108 KB
testcase_05 AC 52 ms
64,640 KB
testcase_06 AC 48 ms
62,240 KB
testcase_07 AC 47 ms
62,096 KB
testcase_08 AC 49 ms
62,164 KB
testcase_09 AC 53 ms
64,580 KB
testcase_10 AC 50 ms
62,340 KB
testcase_11 AC 46 ms
61,864 KB
testcase_12 AC 48 ms
62,188 KB
testcase_13 AC 44 ms
59,816 KB
testcase_14 AC 53 ms
64,616 KB
testcase_15 AC 51 ms
64,452 KB
testcase_16 AC 45 ms
62,024 KB
testcase_17 AC 53 ms
64,676 KB
testcase_18 AC 44 ms
59,816 KB
testcase_19 AC 51 ms
64,544 KB
testcase_20 AC 52 ms
64,564 KB
testcase_21 AC 54 ms
64,612 KB
testcase_22 AC 51 ms
62,300 KB
testcase_23 AC 55 ms
64,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m = int(input())

dp = [0] * (m + 1)
dp[0] = 1

for i in range(0, m):
    for j in range(1, m // (i + 1) + 1):
        dp[(i + 1) * j] = (dp[(i + 1) * j] + dp[i]) % (10**9 + 7)

print(dp[m])
0