結果
| 問題 | No.3357 eの部分和 mod 素数 |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-11-14 21:34:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,528 ms / 10,000 ms |
| コード長 | 199 bytes |
| 記録 | |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 82,064 KB |
| 実行使用メモリ | 60,616 KB |
| 最終ジャッジ日時 | 2025-11-14 21:35:11 |
| 合計ジャッジ時間 | 19,392 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
mod=int(input())
N=mod
c=1
for i in range(1,N):
c*=i
c%=mod
c=pow(c,-1,mod)
result=c
for i in range(N-2,0,-1):
c*=i+1
c%=mod
result+=c
result%=mod
result+=1
result%=mod
print(result)
ゼット