結果

問題 No.2176 LRM Question 1
ユーザー shobonvipshobonvip
提出日時 2023-01-06 21:24:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 75,908 KB
最終ジャッジ日時 2023-08-20 14:25:01
合計ジャッジ時間 4,462 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
71,024 KB
testcase_01 AC 79 ms
71,228 KB
testcase_02 AC 97 ms
75,472 KB
testcase_03 AC 80 ms
71,204 KB
testcase_04 AC 91 ms
75,644 KB
testcase_05 AC 100 ms
75,784 KB
testcase_06 AC 86 ms
75,688 KB
testcase_07 AC 88 ms
75,592 KB
testcase_08 AC 94 ms
75,724 KB
testcase_09 AC 96 ms
75,756 KB
testcase_10 AC 91 ms
75,872 KB
testcase_11 AC 80 ms
71,208 KB
testcase_12 AC 79 ms
71,080 KB
testcase_13 AC 93 ms
75,500 KB
testcase_14 AC 91 ms
75,744 KB
testcase_15 AC 90 ms
75,760 KB
testcase_16 AC 89 ms
75,700 KB
testcase_17 AC 87 ms
75,696 KB
testcase_18 AC 90 ms
75,568 KB
testcase_19 AC 90 ms
75,788 KB
testcase_20 AC 85 ms
75,900 KB
testcase_21 AC 88 ms
75,908 KB
testcase_22 AC 86 ms
75,672 KB
testcase_23 AC 92 ms
75,692 KB
testcase_24 AC 94 ms
75,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l,r,m = map(int,input().split())
tmp = 1
v = 1
ans = 0
for i in range(1, m):
	tmp *= i
	tmp %= m
	v *= tmp
	v %= m
	if l <= i <= r:
		ans += v
ans %= m
print(ans)
0