NC245509. Hanxin Selects Soldiers
描述
Hanxin selects more soldiers for the better!
Hanxin ordered N soldiers to form an army. Each soldier has his own force value. The overall force value of the army is twice the total force value of all soldiers in the army. Do you know the overall force value of Hanxin's army?
输入描述
The first line is a positive integer N (1≤N≤100), representing the number of soldiers ordered by Hanxin.
The second line is N positive integers not greater than 1000, representing the force values of N soldiers respectively.
输出描述
Output an integer, that is, the overall force value of Hanxin's army.
示例1
输入:
4 1 2 3 4
输出:
20
Python3 解法, 执行用时: 41ms, 内存消耗: 4540K, 提交时间: 2022-10-23 08:33:49
input() print(sum( map(int,input().split()))*2)