#C7346. Max Total Attraction Value
Max Total Attraction Value
Max Total Attraction Value
You are given an integer \(n\) and a list of \(n\) integers representing the attraction values of several exhibits. Your task is to calculate the maximum total attraction value by optimally merging these exhibits. In this problem, merging simply means taking the sum of all given attraction values.
Input: The first line contains an integer \(n\) representing the number of exhibits. The second line contains \(n\) space-separated integers which represent the attraction values.
Output: Output a single integer which is the sum of all the attraction values, i.e. the maximum total attraction value.
inputFormat
The input consists of two lines. The first line contains an integer (n). The second line contains (n) space-separated integers, each representing an exhibit's attraction value.
outputFormat
Output a single integer, the maximum total attraction value (i.e., the sum of the (n) attraction values).## sample
1
5
5