#C9788. Minimum Completion Time
Minimum Completion Time
Minimum Completion Time
You are given a number of tasks and an array of integers where each integer represents the amount of time needed to complete a single task. All tasks can run concurrently. Therefore, the minimum amount of time required to finish all tasks is determined by the task that takes the longest time to complete. Formally, if the times are denoted as \(time_1, time_2, \dots, time_n\), the answer is:
$$T = \max_{1 \leq i \leq n} \{time_i\}$$
Your goal is to compute \(T\) given \(n\) tasks and their corresponding times.
inputFormat
The input is given via standard input (stdin) and consists of two lines:
- The first line contains a single integer \(n\) representing the number of tasks.
- The second line contains \(n\) space-separated integers representing the time required for each task.
outputFormat
Output a single integer to standard output (stdout): the minimum completion time needed, which is the maximum value among all given task times.
## sample3
4 3 2
4
</p>