#K62637. Minimum Total Days
Minimum Total Days
Minimum Total Days
You are given n projects and an array a of n integers where each element a_i represents the number of days required to complete the i-th project. The task is to compute the total number of days needed to finish all the projects.
This can be mathematically represented as:
$$Total\ Days = \sum_{i=1}^{n} a_i$$
Input: Two lines: the first line contains an integer n, the second line contains n space-separated integers.
Output: A single integer representing the total number of days.
inputFormat
The input consists of two lines:
- The first line contains a single integer n (1 ≤ n ≤ 105) indicating the number of projects.
- The second line contains n space-separated integers a1, a2, ... , an (1 ≤ ai ≤ 109) representing the days required for each project.
outputFormat
Output a single integer: the sum of all the given numbers which represents the total number of days required to complete all projects.
## sample5
4 2 1 3 5
15
</p>