Back
Close

A hard journey

Statement
You want to go to another city with your own car, Your destination is [[distance]] kilometers away. The fuel tank of your car is [[v]]% full. The fuel tank volume is [[volume]] (in liter) Your car consumes [[y]] liters of fuel per 100 km The consumption [[y]] depends on the speed of your car only. You can use the following formula to calculate [[y]] : [[y]] = ( ([[speed]] - 80 )² / 400 ) + 6 Given the cost of fuel per liter and the speed at which you will be driving. You should output the cost of the trip [[cost]] (rounded down to the nearest integer). And the minimum number of times [[n]] you will need to fill up the fuel tank.

Input description
<<Line 1 :>> An integer [[distance]] that represent the distance between your current location and your destination. <<Line 2 :>> An integer [[v]] between 0 and 100. <<Line 3 :>> An integer [[volume]] that represent the volume of your own tank (in liters) <<Line 4 :>> The [[speed]] at which you will be driving <<Line 5 :>> The [[cost]] of fuel per liter

Output description
A single line containing two integers separated by space. The first integer is the {{cost}} of the tripe, The second integer is the minimum number of times {{n}} you will need to fill up the fuel tank.

Constraints
0 ≤ [[distance]] 0 ≤ [[v]] ≤ 100 0 < [[volume]] 0 < [[speed]] ≤ 140 0 < [[cost]]

Game modes
Shortest

Test cases
Test 1 Test
Input
100 0 50 80 2
Output
12 1

Test 2 Validator
Input
150 25 60 120 3
Output
45 0

Test 3 Test
Input
4000 10 60 100 4
Output
1120 5

Test 4 Validator
Input
400 50 25 40 1
Output
40 2

Test 5 Test
Input
150 100 100 75 2
Output
18 0

Test 6 Validator
Input
1000 20 200 100 5
Output
350 1

Test 7 Test
Input
30 0 10 60 2
Output
4 1

Test 8 Validator
Input
99 100 5 10 10
Output
180 3

Solution language

Solution

Stub generator input