第 473 场 AtCoder Beginner Contest
A
后半部分之和
Second Half Sum
AtCoder
⌀ 0
原题
←B →

后半部分之和AI (CI翻译)

Problem Statement

题目描述

AI (CI翻译)

You are given an integer sequence of length $N$: $A=(A_1,A_2,\dots,A_N)$. Here, $N$ is even. Find the sum of the latter half of $A$, that is, the sum of $A_{(N/2)+1},A_{(N/2)+2},\dots,A_{N}$.

给定一个长度为 $N$ 的整数序列:$A=(A_1,A_2,\dots,A_N)$。其中,$N$ 是偶数。

请计算 $A$ 的后半部分之和,即 $A_{(N/2)+1},A_{(N/2)+2},\dots,A_{N}$ 的和。AI (CI翻译)

Constraints

约束条件

AI (CI翻译)
  • All input values are integers.
  • $N$ is an even number satisfying $2 \le N \le 100$.
  • $1 \le A_i \le 100$
  • 所有输入值均为整数。
  • $N$ 是满足 $2 \le N \le 100$ 的偶数。
  • $1 \le A_i \le 100$
AI (CI翻译)

Input

输入格式

AI (CI翻译)

The input is given from Standard Input in the following format:

输入从标准输入按以下格式给出:AI (CI翻译)

N
A_1 A_2 \dots A_N

N
A_1 A_2 \dots A_N
AI (CI翻译)

Output

输出格式

AI (CI翻译)

Output the answer.

输出答案。AI (CI翻译)

样例

Input #1
8
1 3 7 8 4 2 5 6
Output #1
17
The length of the sequence $A$ is $N=8$, and you should find the sum of $A_5,A_6,A_7,A_8$. Since $A_5+A_6+A_7+A_8 = 4+2+5+6=17$, output $17$.
Input #2
2
1 100
Output #2
100
Input #3
10
31 41 59 26 53 58 97 93 23 84
Output #3
355
题目信息
题号
abc473_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。