logo AlgoBeat OnlineJudge
登录 注册

#215786. [JAG 2024 Summer Camp #2] Add Add Add

内存限制:1024 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You are given two sequences of positive integers of length , and . For , compute the value of , that is, the sum of for all indices such that and .

输入格式

The input is given in the following format:

  • ()
  • All input values are integers.

输出格式

Output lines. On the -th line (), output the answer for the case where .

样例

样例输入 1

3
1 1 1
1 1 1

样例输出 1

2
6
12
16
18

样例输入 2

5
3 7 1 8 3
7 10 5 3 4

样例输出 2

10
37
70
114
165
206
230
248
255

样例输入 3

1
3
5

样例输出 3

8