結果

問題 No.1581 Multiple Sequence
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-07-02 23:07:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 629 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 82,940 KB
最終ジャッジ日時 2023-09-11 23:33:47
合計ジャッジ時間 17,046 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 621 ms
82,736 KB
testcase_01 AC 621 ms
82,584 KB
testcase_02 AC 622 ms
82,664 KB
testcase_03 AC 621 ms
82,472 KB
testcase_04 AC 624 ms
82,784 KB
testcase_05 AC 628 ms
82,484 KB
testcase_06 AC 623 ms
82,628 KB
testcase_07 AC 628 ms
82,476 KB
testcase_08 AC 624 ms
82,512 KB
testcase_09 AC 621 ms
82,680 KB
testcase_10 AC 621 ms
82,500 KB
testcase_11 AC 622 ms
82,564 KB
testcase_12 AC 620 ms
82,672 KB
testcase_13 AC 619 ms
82,516 KB
testcase_14 AC 625 ms
82,564 KB
testcase_15 AC 623 ms
82,940 KB
testcase_16 AC 625 ms
82,504 KB
testcase_17 AC 627 ms
82,588 KB
testcase_18 AC 625 ms
82,528 KB
testcase_19 AC 624 ms
82,760 KB
testcase_20 AC 629 ms
82,508 KB
testcase_21 AC 627 ms
82,532 KB
testcase_22 AC 626 ms
82,636 KB
testcase_23 AC 624 ms
82,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
l = [1]
mod = 10 ** 9 + 7
for i in range(1, 10 ** 5 + 1):
    l.append(sum(l[d - 1] for d in make_divisors(i)) % mod)
print(l[m])
0