結果
| 問題 | No.754 畳み込みの和 |
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2026-01-28 06:40:23 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 85 ms / 5,000 ms |
| コード長 | 541 bytes |
| 記録 | |
| コンパイル時間 | 1,911 ms |
| コンパイル使用メモリ | 82,036 KB |
| 実行使用メモリ | 81,860 KB |
| 最終ジャッジ日時 | 2026-01-28 06:40:26 |
| 合計ジャッジ時間 | 1,952 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
a = []
for i in range(n+1):
a.append(I())
b = []
for i in range(n+1):
b.append(I())
ans = 0
sum_b = sum(b)
for i in range(n+1):
ans += a[i]*sum_b
sum_b -= b[n-i]
MOD = 10**9+7
ans %= MOD
print(ans)
r_ishida