P5707 [Shen Ji 2. Example 12] Late for School
Description
The distance between the school and yyy's home is $s$ meters, and yyy walks to school at a constant speed of $v$ meters per minute.
On the way to school, yyy also needs an extra $10$ minutes to do garbage sorting.
The school requires that yyy must arrive by $\textrm{8:00}$ a.m. Please calculate the latest time yyy can leave home without being late.
Because the trip is long, yyy may have to leave a bit earlier, but the time left earlier will not exceed one day.
Input Format
One line with two positive integers $s, v$, representing the distance and the speed.
Output Format
Output a time in 24-hour format, representing the latest departure time for yyy.
The output format is $\texttt{HH:MM}$, which represents the hour and minute. You must output two digits for each; if not enough, pad with $0$ in front.
Explanation/Hint
For $100\%$ of the testdata, $1 \le s, v \le 10^4$.
Translated by ChatGPT 5