#K42967. Minimum Days to Process All Items
Minimum Days to Process All Items
Minimum Days to Process All Items
In this problem, you are given the number of workers available per day and a list of items (each associated with an importance value). Each worker can process exactly one item per day. Your task is to determine the minimum number of days required to process all the items. Note that the importance values of the items are irrelevant to the scheduling, and the solution depends solely on the total number of items and the number of workers available.
You can compute the answer using the formula:
$$\text{days} = \left\lceil \frac{n}{w} \right\rceil $$where:
- \( n \) is the total number of items,
- \( w \) is the number of workers available each day.
If there are no items, then the answer is 0.
inputFormat
The input is provided via standard input (stdin) and consists of two lines:
- The first line contains a single integer \(w\) representing the number of workers available per day.
- The second line contains a series of space-separated integers representing the importance values of each item. If there are no items to process, the second line will be empty.
outputFormat
The output should be written to standard output (stdout) as a single integer representing the minimum number of days required to process all the items.
## sample3
4 2 3 1 5 7
2