#K76162. Delivery Bikes Problem

    ID: 34582 Type: Default 1000ms 256MiB

Delivery Bikes Problem

Delivery Bikes Problem

You are given several test cases. For each test case, you are provided with the capacity of a bike and a list of package weights. Your task is to calculate the minimum number of bikes required so that all packages can be delivered.

The number of bikes required for a test case is determined by the formula below:

\(\lceil\frac{W}{C}\rceil\)

where \(W\) is the total weight of all packages and \(C\) is the capacity of a single bike.

Note: All input is read from stdin and the output should be printed to stdout.

inputFormat

The input starts with an integer \(T\) representing the number of test cases. For each test case, the input is organized as follows:

  • The first line contains an integer \(C\) denoting the capacity of a bike.
  • The second line contains an integer \(P\) representing the number of packages.
  • The third line contains \(P\) space-separated integers, each representing the weight of a package.

outputFormat

For each test case, output a single line containing an integer representing the minimum number of bikes required. The answer for each test case should be printed on a new line.

## sample
1
8
3
3 2 4
2

</p>