Editorial for LCC/Moose '19 Contest 1 J2 - A Car Problem
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
This is a simple algebra problem.
First, let the speed of your car be . Now, you want to find
.
Since your friend's car is km/h slower, it travels at
km/h.
Now ,
,
and
are given by the following equation:
If we solve for , we get:
Now you can simply print out given
,
and
.
Comments