結果

問題 No.754 畳み込みの和
ユーザー MIKI TakushiMIKI Takushi
提出日時 2018-12-17 00:42:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 444 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 11,880 KB
実行使用メモリ 23,384 KB
最終ジャッジ日時 2023-10-25 23:21:09
合計ジャッジ時間 2,460 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 444 ms
23,384 KB
testcase_01 AC 441 ms
23,260 KB
testcase_02 AC 442 ms
23,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
n = int(input()) + 1
al = [int(input()) for _ in range(n)]
bl = [int(input()) for _ in range(n)]

accb = [0]*n
accb[0] = bl[0]
for i in range(1,n):
    accb[i] = accb[i-1]+bl[i]

res = 0
for i in range(n):
    res += al[i]*accb[n-i-1]

print(res%(10**9+7))
0