[科大国创杯小学组 2024] 代数

Luogu
IDLGB4252
Time1000ms
Memory512MB
DifficultyP1
2024安徽数组科创活动小学活动科大国创杯
小可可最近在学习代数运算中的点积! 给你两个长度为 $n$ 的向量,求它们的点积。对于两个向量 $(a_1, a_2, \cdots, a_n)$ 和 $(b_1, b_2, \cdots, b_n)$,点积定义为 $a_1b_1 + a_2b_2 + \cdots + a_nb_n$。 ## Input 第一行,一个整数 $n$。 第二行,$n$ 个整数,代表 $a_1, a_2, \ldots, a_n$。 第三行,$n$ 个整数,代表 $b_1, b_2, \ldots, b_n$。 ## Output 一行,一个整数,表示两个向量点积的结果。 [samples] ## Note ### 数据范围 - 数据点 $1 \sim 4$,$1 \leq n, a_i, b_i \leq 10$。 - 数据点 $5 \sim 10$,$1 \leq n, a_i, b_i \leq 1000$。 - 数据点 $11 \sim 15$,$1 \leq n,a_i \leq 1000$,$ b_i = 1$。 - 数据点 $16 \sim 21$,$1 \leq n,a_i \leq 1000000$,$b_i = 1$。 - 数据点 $22 \sim 25$,$1 \leq n, a_i, b_i \leq 1000000$。
Samples
Input #1
5
1 2 3 4 5
5 4 3 2 1
Output #1
35
Input #2
5
1 2 3 4 5
1 2 3 4 5
Output #2
55
API Response (JSON)
{
  "problem": {
    "name": "[科大国创杯小学组 2024] 代数",
    "description": {
      "content": "小可可最近在学习代数运算中的点积! 给你两个长度为 $n$ 的向量,求它们的点积。对于两个向量 $(a_1, a_2, \\cdots, a_n)$ 和 $(b_1, b_2, \\cdots, b_n)$,点积定义为 $a_1b_1 + a_2b_2 + \\cdots + a_nb_n$。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4252"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小可可最近在学习代数运算中的点积!\n\n给你两个长度为 $n$ 的向量,求它们的点积。对于两个向量 $(a_1, a_2, \\cdots, a_n)$ 和 $(b_1, b_2, \\cdots, b_n)$,点积定义为 $a_1b_1 + a_2b_2 + \\cdots + a_nb_n$。\n\n## Input\n\n第一行,一个整数 $n$。\n\n第二行,$n$ 个整数,代表 $a_1, a_2, \\l...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments