#CCBCHBAHAI0000139. Tổng mảng đơn giản (Simple Array Sum)
Tổng mảng đơn giản (Simple Array Sum)
Simple Array Sum
Source: HackerRank
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer array , compute the sum of all elements:
Print .
Input
- The first line contains .
- The second line contains integers .
Output
Print one integer: the sum .
Subtasks
Subtask 1 (100 points): and .
Examples
Input
6
1 2 3 4 10 11
Output
31
Explanation
Adding the elements gives , so the program prints 31.