#K65162. Minimum Total Booths
Minimum Total Booths
Minimum Total Booths
In a book fair, each bookseller requires a certain number of booths. Given an integer n representing the number of booksellers and an array of n integers where each integer indicates the number of booths required by a bookseller, your task is to determine the minimum total number of booths needed.
Mathematically, if the booths required by the booksellers are given as an array \( A = [a_1, a_2, \dots, a_n] \), you need to compute the sum:
\( \sum_{i=1}^{n} a_i \)
inputFormat
The input is given via standard input in the following format:
n b1 b2 ... bn
Where:
n
is the number of booksellers.b1, b2, ..., bn
are the number of booths required by each bookseller.
outputFormat
Output a single integer via standard output representing the minimum total number of booths used by summing the booths required for each bookseller.
## sample3
4 2 1
7