結果
問題 | No.2176 LRM Question 1 |
ユーザー |
![]() |
提出日時 | 2023-01-06 21:29:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 157 ms / 2,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 265 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 214,272 KB |
最終ジャッジ日時 | 2024-11-30 17:15:47 |
合計ジャッジ時間 | 3,602 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
L,R,M=map(int,input().split())ap=[1]aap=[1]for i in range(M): ap.append(ap[-1]*(i+1)%M)for i in range(M): aap.append(aap[-1]*ap[i+1]%M)ans=0for i in range(L,R+1):if i>=M: breakans+=aap[i]ans%=Mprint(ans)