#K7686. Minimum Number of Children
Minimum Number of Children
Minimum Number of Children
You are given an integer \( k \) representing the number of different types of candies, and a list of \( k \) integers where the \( i\)-th integer represents the number of candies of the \( i\)-th type. In this problem, you need to determine the minimum number of children required such that all candies can be distributed. Note that, by the problem's specific conditions, every type of candy must be distributed and the answer is always equal to \( k \). This may seem trivial, but it tests your ability to correctly process input and output from standard streams.
Example: For input 3
and candies list 10 20 30
, the answer is 3
.
inputFormat
The input is read from standard input and consists of two lines:
- The first line contains an integer \( k \) which denotes the number of candy types.
- The second line contains \( k \) space-separated integers, where the \( i\)-th integer represents the number of candies of the \( i\)-th type.
outputFormat
Print a single integer to standard output, which is the minimum number of children required. According to the problem's requirement, this value is equal to \( k \).
## sample1
5
1
</p>