結果

問題 No.2176 LRM Question 1
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 21:14:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 180 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 12,404 KB
最終ジャッジ日時 2023-08-23 09:51:18
合計ジャッジ時間 5,504 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,288 KB
testcase_01 AC 17 ms
7,768 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 16 ms
7,760 KB
testcase_04 AC 15 ms
7,892 KB
testcase_05 AC 16 ms
7,752 KB
testcase_06 AC 154 ms
7,776 KB
testcase_07 AC 1,073 ms
7,900 KB
testcase_08 AC 160 ms
7,856 KB
testcase_09 AC 205 ms
7,784 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

r=range
L,R,M=map(int,input().split())
b=1
for i in r(L):
	b=(b*pow(i+1,L-i,M))%M
	if b<1:break
a=b
for i in r(L+1,R+1):
	if b<1:break
	for j in r(1,i+1):b=(b*j)%M
	a+=b
print(a%M)
0