結果
| 問題 | No.3357 eの部分和 mod 素数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-14 21:44:25 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 2,085 ms |
| コンパイル使用メモリ | 336,180 KB |
| 実行使用メモリ | 527,936 KB |
| 最終ジャッジ日時 | 2026-07-16 14:54:02 |
| 合計ジャッジ時間 | 14,328 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 MLE * 1 -- * 11 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/modint>
#define int long long
using namespace std;
const int inf=1e18;
using mint=atcoder::modint;
signed main(){
int p;cin>>p;
atcoder::modint::set_mod(p);
mint cur;
vector<mint>fac={1};
for(int i=0;i<p;i++){
fac.push_back(fac.back()*fac.size());
}
for(int i=0;i<p;i++)cur+=fac[i].inv();
cout<<cur.val()<<endl;
}