結果
| 問題 | No.2176 LRM Question 1 |
| コンテスト | |
| ユーザー |
sepa38
|
| 提出日時 | 2023-01-07 09:50:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 85,516 KB |
| 実行使用メモリ | 68,136 KB |
| 最終ジャッジ日時 | 2026-05-25 03:16:24 |
| 合計ジャッジ時間 | 5,187 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 TLE * 1 -- * 4 |
ソースコード
l, r, m = map(int, input().split())
fac = 1
now = 1
for i in range(l):
fac *= i + 1
fac %= m
now *= fac
now %= m
ans = 0
for i in range(l, r+1):
if now == 0:
break
ans += now
fac *= i + 1
fac %= m
now *= fac
now %= m
print(ans % m)
sepa38