結果

問題 No.1581 Multiple Sequence
ユーザー SSRSSSRS
提出日時 2021-03-06 17:31:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 77,308 KB
最終ジャッジ日時 2023-09-11 14:19:27
合計ジャッジ時間 3,388 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,512 KB
testcase_01 AC 71 ms
71,160 KB
testcase_02 AC 84 ms
77,272 KB
testcase_03 AC 86 ms
77,308 KB
testcase_04 AC 81 ms
76,752 KB
testcase_05 AC 88 ms
77,072 KB
testcase_06 AC 81 ms
76,724 KB
testcase_07 AC 81 ms
76,680 KB
testcase_08 AC 83 ms
76,684 KB
testcase_09 AC 86 ms
77,052 KB
testcase_10 AC 83 ms
77,104 KB
testcase_11 AC 80 ms
76,388 KB
testcase_12 AC 81 ms
76,828 KB
testcase_13 AC 78 ms
76,600 KB
testcase_14 AC 85 ms
77,100 KB
testcase_15 AC 82 ms
77,140 KB
testcase_16 AC 79 ms
76,756 KB
testcase_17 AC 85 ms
77,292 KB
testcase_18 AC 79 ms
76,524 KB
testcase_19 AC 86 ms
77,068 KB
testcase_20 AC 85 ms
77,172 KB
testcase_21 AC 84 ms
77,228 KB
testcase_22 AC 83 ms
76,964 KB
testcase_23 AC 86 ms
77,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 1000000007
M = int(input())
dp = [0] * (M + 1)
dp[0] = 1
for i in range(M):
  for j in range(i + 1, M + 1, i + 1):
    dp[j] = (dp[j] + dp[i]) % MOD
print(dp[M])
0