#C6677. Minimum Processing Time

    ID: 50463 Type: Default 1000ms 256MiB

Minimum Processing Time

Minimum Processing Time

You are given a production line with n processing stations. Each station i requires a processing time of t_i. The product must pass through each station in sequence. Your task is to compute the total processing time required, which is given by the formula:

\(T = t_1 + t_2 + \cdots + t_n\)

Input: The first line contains an integer representing the number of stations. The second line contains n space-separated integers corresponding to the processing times at each station.

Output: Output a single integer representing the total processing time.

inputFormat

The input is given via standard input (stdin) and consists of two lines:

  • The first line contains a single integer \(n\) (\(1 \leq n \leq 10^5\)), indicating the number of stations.
  • The second line contains \(n\) space-separated integers \(t_1, t_2, \dots, t_n\) (each \(1 \leq t_i \leq 10^9\)), which represent the processing times for each station.

outputFormat

The output is a single integer printed to standard output (stdout) representing the total processing time calculated as:

\(T = t_1 + t_2 + \cdots + t_n\)

## sample
5
3 1 4 1 5
14