Car Range
The *fuel economy* of a car is the distance which it can travel on one litre of fuel. The base fuel economy (i.e, its fuel economy when there is only one person - the driver - in the car) of a certain car is $M$ kilometres per litre. It was also observed that every extra passenger in the car *decreases* the fuel economy by $1$ kilometre per litre. $P$ people want to take this car for a journey.
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start