#K38637. Total Pages Read
Total Pages Read
Total Pages Read
You are given an integer D
representing the number of days and a list of D
integers where each integer indicates the number of pages read on that day. Your task is to compute the total number of pages read over all D
days.
Input Format:
- The first line contains a single integer
D
indicating the number of days. - The second line contains
D
space-separated integers, where the i-th integer represents the number of pages read on the i-th day.
Output Format:
- Output a single integer which is the sum of pages read over
D
days.
Constraints:
- $1 \leq D \leq 10^5$
- $0 \leq pages \leq 10^5$
Example:
Input: 5 10 20 30 40 50</p>Output: 150
inputFormat
The first line contains an integer D
representing the number of days.
The second line contains D
space-separated integers representing the number of pages read each day.
outputFormat
Output a single integer that is the total number of pages read over all D
days.
5
10 20 30 40 50
150
</p>