結果

問題 No.2880 Max Sigma Mod
コンテスト
ユーザー HIcoder
提出日時 2024-09-09 23:18:19
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 591 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 548 ms
コンパイル使用メモリ 137,816 KB
実行使用メモリ 16,896 KB
最終ジャッジ日時 2026-07-05 15:48:49
合計ジャッジ時間 3,426 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<string>
#include<queue>
#include<vector>
#include<cassert>
#include<random>
#include<set>
#include<map>
#include<cassert>
#include<unordered_map>
#include<bitset>
#include<numeric>
#include<algorithm>
using namespace std;
typedef long long ll;
const int inf=1<<30;
const ll INF=1LL<<62;
typedef pair<int,ll> P;
typedef pair<int,P> PP; 
const ll MOD=998244353;
const int dy[]={0,1,0,-1};
const int dx[]={1,0,-1,0};

int main(){
    ll N,M;
    cin>>N>>M;
    ll ans=0;
    ll x=min(N,M-1);
    for(int i=1;i<=M;i++){
        ans+=x%i;
    }
    cout<<ans<<endl;
}
0