結果
| 問題 |
No.2880 Max Sigma Mod
|
| コンテスト | |
| ユーザー |
SnowBeenDiding
|
| 提出日時 | 2024-09-08 12:45:32 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 437 bytes |
| コンパイル時間 | 5,604 ms |
| コンパイル使用メモリ | 307,348 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-08 12:45:40 |
| 合計ジャッジ時間 | 6,687 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 WA * 26 |
ソースコード
#include <atcoder/all>
#include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace atcoder;
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
auto f = [&](int x) {
ll ret = 0;
rep(i, 1, m + 1) { ret += x % i; }
return ret;
};
ll ans = 0;
ans = max(ans, f(1));
ans = max(ans, f(n));
cout << ans << endl;
}
SnowBeenDiding