結果

問題 No.2176 LRM Question 1
ユーザー square1001square1001
提出日時 2023-01-06 21:23:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 225 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-08-20 14:24:35
合計ジャッジ時間 1,532 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,820 KB
testcase_01 AC 14 ms
7,908 KB
testcase_02 WA -
testcase_03 AC 14 ms
7,868 KB
testcase_04 AC 13 ms
7,824 KB
testcase_05 AC 18 ms
7,836 KB
testcase_06 AC 14 ms
7,832 KB
testcase_07 AC 21 ms
7,784 KB
testcase_08 AC 14 ms
7,772 KB
testcase_09 AC 15 ms
7,772 KB
testcase_10 WA -
testcase_11 AC 13 ms
7,816 KB
testcase_12 WA -
testcase_13 AC 13 ms
7,836 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 13 ms
7,780 KB
testcase_18 AC 14 ms
7,816 KB
testcase_19 AC 15 ms
7,872 KB
testcase_20 AC 14 ms
7,768 KB
testcase_21 AC 13 ms
7,972 KB
testcase_22 WA -
testcase_23 AC 14 ms
7,812 KB
testcase_24 AC 13 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L, R, M = map(int, input().split())

if R >= M:
	print(0)
else:
	fact = 1
	mul = 1
	answer = 0
	for i in range(1, R + 1):
		fact = fact * i % M
		mul = mul * fact % M
		if i >= L:
			answer = (answer + mul) % M
	print(answer)
0