結果
問題 |
No.2880 Max Sigma Mod
|
ユーザー |
![]() |
提出日時 | 2024-09-23 01:31:31 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 82,296 KB |
最終ジャッジ日時 | 2024-09-23 01:31:53 |
合計ジャッジ時間 | 21,522 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 14 TLE * 2 -- * 32 |
ソースコード
import sys input = sys.stdin.readline N,M=map(int,input().split()) def calc(x): ANS=x*M ind=1 while ind<=M: k=x//ind if k==0: break MAX=x//k # [ind,MAX] MAX=min(MAX,M) ANS-=(ind+MAX)*(MAX-ind+1)*k//2 ind=MAX+1 return ANS ANS=0 for i in range(N+1): ANS=max(ANS,calc(i)) print(ANS)