#C4288. Accurate Guest Seating
Accurate Guest Seating
Accurate Guest Seating
You are given a scenario where you must determine if an exact number of guests can be accommodated at a restaurant with a fixed number of tables, each table having the same seating capacity. More formally, you are provided three integers: N (the number of guests), M (the number of tables), and K (the seating capacity per table). The guests can be exactly accommodated if and only if the equation \(N = M \times K\) holds.
For each test case, print possible
if the equation holds, or impossible
otherwise.
inputFormat
The input is read from stdin and is formatted as follows:
- The first line contains an integer T, representing the number of test cases.
- Each of the following T lines contains three space-separated integers N, M, and K.
outputFormat
For each test case, output a single line on stdout containing either possible
or impossible
based on whether the guests can be exactly accommodated.
2
100 10 10
42 5 9
possible
impossible
</p>