#K46067. Taco Fuel Cost Calculation

    ID: 27894 Type: Default 1000ms 256MiB

Taco Fuel Cost Calculation

Taco Fuel Cost Calculation

You are given the number of trips and, for each trip, the distance traveled (in km), the fuel efficiency (in km/l), and the price per litre of fuel (in rupees). Your task is to compute the total fuel cost for each trip. The fuel cost is calculated using the formula:

\(\text{Cost} = \frac{D}{E} \times P\)

where \(D\) is the distance, \(E\) is the fuel efficiency, and \(P\) is the price per litre. Print the cost of each trip on a new line.

inputFormat

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

  • The first line contains a single integer \(T\) representing the number of trips.
  • Each of the next \(T\) lines contains three space-separated integers \(D\), \(E\), and \(P\) where:
    • \(D\) is the distance in km,
    • \(E\) is the fuel efficiency in km/l, and
    • \(P\) is the price per litre.

outputFormat

For each trip, output the total fuel cost on a new line to standard output (stdout). Each value should be obtained by computing \(\text{Cost} = \frac{D}{E} \times P\) and then converting the result to an integer.

## sample
3
300 20 70
450 15 85
600 25 60
1050

2550 1440

</p>