#C3397. Minimum Task Completion Time

    ID: 46819 Type: Default 1000ms 256MiB

Minimum Task Completion Time

Minimum Task Completion Time

You are given an integer \( n \) representing the number of checkpoints and an array \( time \) of length \( n \), where \( time[i] \) denotes the time required to complete the task at the \( i^{th} \) checkpoint. Your task is to compute the total minimum time required to complete all tasks.

The total time \( T \) is calculated using the formula:

\( T = \sum_{i=1}^{n} time[i] \)

This is a straightforward summation problem, where you simply aggregate the time required at each checkpoint.

inputFormat

The first line contains an integer ( n ) representing the number of checkpoints. The second line contains ( n ) space-separated integers indicating the time required at each checkpoint.

outputFormat

Output a single integer that denotes the total minimum time required to complete all tasks.## sample

5
2 1 3 2 4
12