#K82677. Minimum Tables Required for Game Nights

    ID: 36029 Type: Default 1000ms 256MiB

Minimum Tables Required for Game Nights

Minimum Tables Required for Game Nights

You are given a number of game nights. For each game night, there are \(P\) participants. A table can accommodate at most 8 participants. The task is to compute the minimum number of tables required, which is given by the formula:

\(tables = \left\lceil \frac{P}{8} \right\rceil\)

Read the input from standard input and print the results to standard output.

inputFormat

The first line contains an integer (T) representing the number of game nights. Each of the following (T) lines contains a single integer (P), the number of participants for that game night.

outputFormat

For each game night, output a single line with the minimum number of tables required.## sample

3
16
23
40
2

3 5

</p>