#ABC479A. 奇数下标求和 / Odd Index Sum
奇数下标求和 / Odd Index Sum
Problem Statement
You are given an integer sequence of length : . Find the sum of the odd-indexed terms of . More formally, find the sum of over all odd satisfying .
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Output the answer.
5
3 1 4 1 5
12
In this input, , and the terms to be summed are . Output their sum, that is, .
6
2 7 1 8 2 8
5
In this input, , and the terms to be summed are . Output their sum, that is, .
9
100 40 30 50 20 90 100 80 60
310
- Source: AtCoder ABC 479 A
相关
在下列比赛中: