Given an array of length N, you need to find and print the sum of all elements of the array.
Input Format :
Line 1 : An Integer N i.e. size of array
Line 2 : N integers which are elements of the array, separated by spaces
Output Format :
Sum
Constraints :
1 <= N <= 10^6Sample Input :
3
9 8 9
Sample Output :
26
Solution :
## Read input as specified in the question. ## Print output as specified in the question. N = int(input()) list = [int(x) for x in input().split()] sum = 0 for ele in list: sum += ele print(sum)