#K38197. Taco Truck Problem

    ID: 26145 Type: Default 1000ms 256MiB

Taco Truck Problem

Taco Truck Problem

You are given a scenario where a number of houses each requires a fixed weight of building materials. A truck can carry a limited weight per trip. Your task is to determine the minimum number of trucks needed to carry the required materials for all houses in each test case.

For each test case, you are given three integers: N (the number of houses), H (the weight of materials needed per house), and W (the weight capacity of a truck). The minimum number of trucks required can be computed using the formula:

$$ trucks = \left\lceil \frac{N \times H}{W} \right\rceil $$

Where \(\lceil x \rceil\) represents the ceiling of \(x\), i.e., the smallest integer not less than \(x\).

inputFormat

The input is read from stdin and has the following format:

T
N1 H1 W1
N2 H2 W2
... 
NT HT WT

Where:

  • T is the number of test cases.
  • For each test case, three integers are provided: N (number of houses), H (weight per house), and W (truck capacity).

outputFormat

For each test case, output a single integer on a new line representing the minimum number of trucks required. The output is written to stdout.

## sample
4
10 5 20
15 30 40
7 50 35
12 25 100
3

12 10 3

</p>