結果
問題 | No.2176 LRM Question 1 |
ユーザー |
![]() |
提出日時 | 2023-01-06 21:30:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 865 ms / 2,000 ms |
コード長 | 203 bytes |
コンパイル時間 | 227 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 89,344 KB |
最終ジャッジ日時 | 2024-11-30 17:16:07 |
合計ジャッジ時間 | 7,919 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
l,r,m = map(int,input().split())a = [1]; b = [1]; ans = 0for i in range(1,m): a.append(a[-1]*i%m)for i in range(1,m): b.append(b[-1]*a[i]%m)for i in range(l,min(r+1,m)): ans = (ans+b[i])%mprint(ans)