結果

問題 No.2880 Max Sigma Mod
ユーザー karinohito
提出日時 2024-09-08 13:03:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 514 bytes
コンパイル時間 2,081 ms
コンパイル使用メモリ 194,544 KB
最終ジャッジ日時 2025-02-24 05:28:15
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include<atcoder/maxflow>
using namespace atcoder;
using namespace std;
using ll=long long;

int main(){
    int N,M;
    cin>>N>>M;
    clock_t start=clock(),end=clock();
    ll an=0,id=0;
    while(double(end-start)/CLOCKS_PER_SEC<2.7){
        ll res=0;
        for(int i=1;i<=M;i++){
            res+=N%i;
        }
        if(an<res){
            an=max(an,res);
            id=N;
        }
        
        N--;
        if(N==0)break;
        end=clock();
    }
    cout<<an<<endl;
}
0