#K49472. Max Rows of Trees
Max Rows of Trees
Max Rows of Trees
You are given a rectangular field described by its width W and length L, along with a minimum distance D that must be maintained between successive rows of trees. Your task is to compute the maximum number of rows of trees that can be planted along the length of the field. Note that the planting is only constrained by the length; hence, the number of rows is given by \(\left\lfloor \frac{L}{D} \right\rfloor\).
For example, if the field has a length of 10 and the minimum distance is 2, then the solution is \(\lfloor 10/2 \rfloor = 5\) rows. You will be provided with multiple test cases.
inputFormat
The input is given via standard input (stdin) with the following format:
- The first line contains a single integer T (1 ≤ T ≤ 1000), the number of test cases.
- Each of the next T lines contains three space-separated integers W, L, and D where:
- W is the width of the field (not used in computation),
- L is the length of the field, and
- D is the minimum required spacing between rows.
Note: Although the width is provided, the answer depends solely on the length and the distance.
outputFormat
For each test case, output a single integer on a new line representing the maximum number of rows that can be planted along the field's length.
The output should be directed to standard output (stdout).
## sample3
10 10 2
15 7 3
5 5 1
5
2
5
</p>