#C. 【程序设计】数组求和

    Type: Default 1000ms 256MiB

【程序设计】数组求和

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

对于一个给定的长度为 n 的数组,求数组中所有整数元素的和。

输入格式

输入第一行一个正整数n(1≤n≤100000),表示有多少个数。

接下来有一行 n 个整数k(1≤k≤100000),表示这个数组中的每个元素。

输出格式

输出一个整数,表示这个数组中所有整数元素的和。

输出时每行末尾的多余空格,不影响答案正确性

样例输入

5

1 5 3 2 4

样例输出

15

一维数组

Not Claimed
Status
Done
Problem
11
Open Since
2024-7-13 0:00
Deadline
2024-7-15 23:59
Extension
24 hour(s)