#K83707. Minimum Hits to Defeat Monsters

    ID: 36257 Type: Default 1000ms 256MiB

Minimum Hits to Defeat Monsters

Minimum Hits to Defeat Monsters

You are given a number of test cases. For each test case, you are provided two integers:

  • H: the monster's health points.
  • D: the damage per hit.

Your task is to determine the minimum number of hits needed to defeat the monster. Mathematically, the number of hits required is given by the formula:

\(\lceil \frac{H}{D} \rceil\)

where \(\lceil x \rceil\) denotes the ceiling of \(x\). Each test case is processed independently.

Note: The input is provided via standard input (stdin) and the result should be output to standard output (stdout), with each answer on a new line.

inputFormat

The first line of the input contains a single integer T indicating the number of test cases. The next T lines each contain two integers H and D separated by a space, representing the health points of the monster and the damage per hit respectively.

Constraints:

  • 1 ≤ T ≤ 104
  • 1 ≤ H, D ≤ 109

outputFormat

For each test case, output a single line containing the minimum number of hits required to defeat the monster.

## sample
3
17 5
100 20
7 7
4

5 1

</p>