結果
問題 | No.2880 Max Sigma Mod |
ユーザー |
![]() |
提出日時 | 2024-09-10 22:25:38 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 132,656 KB |
最終ジャッジ日時 | 2024-09-10 22:25:43 |
合計ジャッジ時間 | 5,585 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 5 TLE * 1 -- * 42 |
ソースコード
def calc(x, m):ret = 0now = 2i = 2d = x // iwhile i <= m:while i + 1 <= m and d == x // (i + 1):i += 1ret += x * (i - now + 1) - (i - now + 1) * (i + now) // 2 * di += 1d = x // inow = ireturn retN, M = map(int, input().split())ans = 0for i in range(1, N + 1):ans = max(ans, calc(i, M))print(ans)