結果

問題 No.2880 Max Sigma Mod
コンテスト
ユーザー kaede2020
提出日時 2024-09-08 14:36:26
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 797 bytes
コンパイル時間 6,063 ms
コンパイル使用メモリ 337,024 KB
実行使用メモリ 13,764 KB
最終ジャッジ日時 2024-09-08 14:36:37
合計ジャッジ時間 10,750 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other AC * 1 WA * 4 TLE * 1 -- * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using mint = modint998244353;
#define ull unsigned long long
random_device rnd;
mt19937 mt(rnd());
int RandInt(int a, int b) {
    return a + mt() % (b - a + 1);
}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

ll n,m;
int main(){
    cin>>n>>m;
    ll ans=0;
    rep(i,n){
        ll tmp=0;
        rep(j,m){
            ll val=(n)%(j+1);
            if(val==n){
                tmp+=val*(m-j);
                break;
            }else{
                tmp+=val;
            }
            //cerr<<val<<" ";
        }
        //cerr<<endl;
        cerr<<tmp<<endl;
        ans=max(ans,tmp);
    }
    cout<<ans<<endl;
    return 0;
}
0