#C3933. Traffic Signal Duration Calculation

    ID: 47415 Type: Default 1000ms 256MiB

Traffic Signal Duration Calculation

Traffic Signal Duration Calculation

You are given a series of test cases representing traffic signal cycles. For each test case, you are provided with four integers: N, G, Y, and R.

N denotes the number of cycles, and G, Y, and R denote the duration in seconds of the green, yellow, and red signals respectively for one cycle.

Your task is to compute the total duration spent on each color for each test case. The formula for each color is given by:

  • Green: \(N \times G\)
  • Yellow: \(N \times Y\)
  • Red: \(N \times R\)

Output the results in the order: total green, total yellow, and total red durations for each test case, with each test case's result on a new line.

inputFormat

The first line of the input contains an integer T, the number of test cases.

Each of the next T lines contains four space-separated integers N, G, Y, and R.

outputFormat

For each test case, output a single line containing three integers representing the total duration of the green, yellow, and red lights respectively. Each value should be separated by a single space.

## sample
2
3 30 5 25
5 45 10 20
90 15 75

225 50 100

</p>