結果
問題 |
No.1260 たくさんの多項式
|
ユーザー |
|
提出日時 | 2020-10-17 02:08:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 367 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-21 01:41:36 |
合計ジャッジ時間 | 40,514 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 TLE * 11 |
ソースコード
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)