結果

問題 No.1084 積の積
ユーザー c-yanc-yan
提出日時 2020-06-20 06:16:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 193 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 18,740 KB
最終ジャッジ日時 2023-09-16 16:48:52
合計ジャッジ時間 9,602 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,768 KB
testcase_01 AC 14 ms
7,812 KB
testcase_02 AC 14 ms
7,884 KB
testcase_03 AC 14 ms
7,768 KB
testcase_04 WA -
testcase_05 AC 138 ms
9,968 KB
testcase_06 AC 167 ms
9,892 KB
testcase_07 AC 14 ms
7,872 KB
testcase_08 AC 14 ms
7,812 KB
testcase_09 AC 373 ms
17,992 KB
testcase_10 AC 15 ms
7,820 KB
testcase_11 AC 31 ms
8,028 KB
testcase_12 AC 215 ms
12,528 KB
testcase_13 AC 443 ms
17,440 KB
testcase_14 AC 166 ms
11,288 KB
testcase_15 AC 154 ms
11,264 KB
testcase_16 AC 504 ms
18,740 KB
testcase_17 AC 198 ms
12,120 KB
testcase_18 AC 338 ms
15,120 KB
testcase_19 AC 442 ms
17,840 KB
testcase_20 AC 111 ms
9,972 KB
testcase_21 AC 167 ms
11,452 KB
testcase_22 AC 133 ms
10,648 KB
testcase_23 AC 265 ms
13,552 KB
testcase_24 AC 249 ms
13,248 KB
testcase_25 AC 437 ms
17,380 KB
testcase_26 AC 514 ms
18,584 KB
testcase_27 AC 497 ms
18,564 KB
testcase_28 AC 509 ms
18,564 KB
testcase_29 AC 500 ms
18,568 KB
testcase_30 AC 507 ms
18,468 KB
testcase_31 AC 501 ms
18,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p=1000000007
N,*A=map(int, open(0).read().split())
l,a,b,c=0,1,1,1
for r in range(N):
	a*=A[r]
	b*=pow(A[r],r-l+1,p)
	b%=p
	while a>=p:
		b*=pow(a,p-2,p)
		a//=A[l]
		l+=1
	c*=b
	c%=p
print(c)
0