結果

問題 No.1581 Multiple Sequence
ユーザー googol_S0googol_S0
提出日時 2021-07-02 21:30:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 291 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 86,692 KB
実行使用メモリ 100,908 KB
最終ジャッジ日時 2023-09-11 21:19:15
合計ジャッジ時間 6,896 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,136 KB
testcase_01 AC 69 ms
70,976 KB
testcase_02 AC 227 ms
88,860 KB
testcase_03 AC 245 ms
98,632 KB
testcase_04 AC 118 ms
82,532 KB
testcase_05 AC 264 ms
99,456 KB
testcase_06 AC 142 ms
85,500 KB
testcase_07 AC 106 ms
76,632 KB
testcase_08 AC 123 ms
83,980 KB
testcase_09 AC 227 ms
89,208 KB
testcase_10 AC 171 ms
86,812 KB
testcase_11 AC 92 ms
76,252 KB
testcase_12 AC 126 ms
84,260 KB
testcase_13 AC 81 ms
76,396 KB
testcase_14 AC 257 ms
98,640 KB
testcase_15 AC 187 ms
87,512 KB
testcase_16 AC 101 ms
76,508 KB
testcase_17 AC 291 ms
100,268 KB
testcase_18 AC 93 ms
76,256 KB
testcase_19 AC 216 ms
88,508 KB
testcase_20 AC 241 ms
88,988 KB
testcase_21 AC 242 ms
89,532 KB
testcase_22 AC 158 ms
86,404 KB
testcase_23 AC 280 ms
100,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M=int(input())
DP=[0]*(M+1)
DP[M]=1
D=[[] for i in range(M+1)]
for i in range(1,M+1):
  for j in range(i,M+1,i):
    D[j].append(i)
mod=10**9+7
for i in range(M,0,-1):
  for j in range(len(D[i])):
    DP[(i//D[i][j])-1]+=DP[i]
    DP[(i//D[i][j])-1]%=mod
print(DP[0])
0