#K42672. Taco Scoring Challenge

    ID: 27140 Type: Default 1000ms 256MiB

Taco Scoring Challenge

Taco Scoring Challenge

You are organizing a coding competition where each participant is scored based on their performance on a problem with several sub-problems. For each participant, you are given three integers: \(Y\), \(M\), and \(K\). Here, \(Y\) is the total points available for the problem, \(M\) is the total number of sub-problems, and \(K\) is the number of sub-problems solved by the participant.

The scoring is computed using the formula:

\(score = \left\lfloor \frac{Y}{M} \right\rfloor \times K\)

where \(\lfloor \cdot \rfloor\) denotes the floor division (i.e. integer division). Your task is to implement a program that reads the input, computes the score for each participant, and outputs the scores.

inputFormat

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

  • The first line contains an integer \(N\) representing the number of participants.
  • Each of the following \(N\) lines contains three space-separated integers \(Y\), \(M\), and \(K\), where:
    • \(Y\) is the total points available.
    • \(M\) is the number of sub-problems.
    • \(K\) is the number of sub-problems solved by the participant.

outputFormat

Output a single line to standard output (stdout) containing \(N\) space-separated integers. Each integer is the computed score for the corresponding participant in the order of input.

## sample
3
90 5 3
200 10 6
150 15 7
54 120 70