結果
| 問題 | No.2880 Max Sigma Mod |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-18 00:02:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 411 bytes |
| コンパイル時間 | 1,641 ms |
| コンパイル使用メモリ | 166,724 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-18 00:02:42 |
| 合計ジャッジ時間 | 2,642 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 34 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
bool test(int x){
for(int i=2;i*i<=x;i++){
if(x%i==0) return false;
}
return true;
}
signed main() {
int n,m;
cin>>n>>m;
int nw=0,ans=0;
for(int i=n;i>1;i--){
if(test(i)) {
nw=i;
break;
}
}
for(int j=1;j<=m;j++){
ans+=nw%j;
}
cout<<ans<<'\n';
}