結果
| 問題 | No.2880 Max Sigma Mod |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-09-10 22:25:38 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 395 bytes |
| 記録 | |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 95,720 KB |
| 実行使用メモリ | 82,944 KB |
| 最終ジャッジ日時 | 2026-08-25 16:56:19 |
| 合計ジャッジ時間 | 5,863 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 5 TLE * 1 -- * 42 |
ソースコード
def calc(x, m):
ret = 0
now = 2
i = 2
d = x // i
while i <= m:
while i + 1 <= m and d == x // (i + 1):
i += 1
ret += x * (i - now + 1) - (i - now + 1) * (i + now) // 2 * d
i += 1
d = x // i
now = i
return ret
N, M = map(int, input().split())
ans = 0
for i in range(1, N + 1):
ans = max(ans, calc(i, M))
print(ans)
ntuda