結果
問題 |
No.1581 Multiple Sequence
|
ユーザー |
|
提出日時 | 2021-12-26 10:40:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 273 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 82,952 KB |
最終ジャッジ日時 | 2024-09-22 17:37:09 |
合計ジャッジ時間 | 7,365 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 21 |
ソースコード
M = int(input()) f = [-1] * (M + 1) f[1] = 1 f[0] = 1 for i in range(2,M+1): ans = 0 j = 1 while j * j <= i: if i % j == 0: ans += f[i//j-1] if j != i // j: ans += f[j-1] j += 1 f[i] = ans print(f[M])