結果

問題 No.2176 LRM Question 1
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 21:13:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 178 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 12,428 KB
最終ジャッジ日時 2023-08-23 09:51:12
合計ジャッジ時間 6,824 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,268 KB
testcase_01 AC 16 ms
7,892 KB
testcase_02 AC 16 ms
7,856 KB
testcase_03 AC 16 ms
7,856 KB
testcase_04 AC 16 ms
7,840 KB
testcase_05 AC 16 ms
7,840 KB
testcase_06 WA -
testcase_07 AC 1,113 ms
7,856 KB
testcase_08 WA -
testcase_09 WA -
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):
	if b<1:break
	for j in r(1,i+1):b=(b*j)%M
	a+=b
print(a%M)
0