結果

問題 No.1260 たくさんの多項式
ユーザー tonyu0tonyu0
提出日時 2020-10-17 02:08:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 367 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,004 KB
最終ジャッジ日時 2023-09-28 07:14:33
合計ジャッジ時間 70,892 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
7,976 KB
testcase_01 AC 34 ms
7,856 KB
testcase_02 AC 34 ms
7,816 KB
testcase_03 AC 23 ms
7,948 KB
testcase_04 AC 25 ms
7,916 KB
testcase_05 AC 37 ms
7,852 KB
testcase_06 AC 25 ms
7,852 KB
testcase_07 AC 36 ms
7,812 KB
testcase_08 AC 34 ms
7,784 KB
testcase_09 AC 30 ms
7,856 KB
testcase_10 AC 37 ms
7,816 KB
testcase_11 AC 31 ms
7,916 KB
testcase_12 AC 32 ms
7,848 KB
testcase_13 AC 38 ms
7,904 KB
testcase_14 AC 37 ms
7,820 KB
testcase_15 AC 33 ms
7,848 KB
testcase_16 AC 24 ms
7,852 KB
testcase_17 AC 34 ms
7,860 KB
testcase_18 AC 38 ms
7,820 KB
testcase_19 AC 37 ms
7,804 KB
testcase_20 TLE -
testcase_21 AC 720 ms
7,852 KB
testcase_22 TLE -
testcase_23 AC 1,723 ms
7,852 KB
testcase_24 AC 1,819 ms
7,860 KB
testcase_25 AC 1,416 ms
7,784 KB
testcase_26 AC 1,712 ms
7,908 KB
testcase_27 AC 1,359 ms
7,812 KB
testcase_28 TLE -
testcase_29 AC 1,739 ms
8,000 KB
testcase_30 AC 1,149 ms
7,948 KB
testcase_31 AC 1,736 ms
7,968 KB
testcase_32 AC 1,794 ms
7,852 KB
testcase_33 AC 1,458 ms
7,916 KB
testcase_34 TLE -
testcase_35 AC 1,052 ms
7,812 KB
testcase_36 AC 930 ms
7,924 KB
testcase_37 AC 1,810 ms
7,856 KB
testcase_38 AC 1,930 ms
7,852 KB
testcase_39 TLE -
testcase_40 AC 1,724 ms
7,896 KB
testcase_41 TLE -
testcase_42 AC 1,637 ms
7,808 KB
testcase_43 TLE -
testcase_44 AC 1,495 ms
7,860 KB
testcase_45 AC 1,436 ms
7,860 KB
testcase_46 AC 1,322 ms
7,904 KB
testcase_47 AC 1,600 ms
7,852 KB
testcase_48 AC 341 ms
7,960 KB
testcase_49 AC 1,244 ms
7,848 KB
testcase_50 AC 650 ms
7,860 KB
testcase_51 TLE -
testcase_52 AC 807 ms
7,852 KB
testcase_53 AC 1,103 ms
7,816 KB
testcase_54 TLE -
testcase_55 TLE -
testcase_56 AC 1,178 ms
7,964 KB
testcase_57 AC 1,697 ms
7,900 KB
testcase_58 AC 1,057 ms
7,924 KB
testcase_59 AC 1,802 ms
7,900 KB
testcase_60 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
mod = 10 ** 9 + 7

ans = 0
j = 2
for i in range(2, int(n ** .5) + 1):
    now = n
    while now > 0:
        ans += now % i
        now //= i
    ans += now
    ans %= mod
    j = i + 1
    
while j <= n:
    m = n // j
    r = n // m
    ans += n * (r - j + 1) - (j - 1 + r - 1) * (r - j + 1) // 2 * m % mod
    ans %= mod
    j = r + 1
print(ans)

0