結果

問題 No.2176 LRM Question 1
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 21:16:08
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 180 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 80,508 KB
最終ジャッジ日時 2023-08-23 09:51:23
合計ジャッジ時間 5,390 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
75,424 KB
testcase_01 AC 70 ms
71,444 KB
testcase_02 AC 69 ms
71,364 KB
testcase_03 AC 71 ms
71,404 KB
testcase_04 AC 73 ms
71,144 KB
testcase_05 AC 72 ms
71,244 KB
testcase_06 AC 81 ms
76,064 KB
testcase_07 AC 118 ms
76,056 KB
testcase_08 AC 80 ms
76,176 KB
testcase_09 AC 83 ms
76,168 KB
testcase_10 AC 193 ms
76,048 KB
testcase_11 AC 71 ms
71,344 KB
testcase_12 AC 70 ms
71,440 KB
testcase_13 AC 69 ms
71,276 KB
testcase_14 TLE -
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