MLE '19 Contest 4 P6 - No

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 128M

Author:
Problem type

Evan/Ninjaclashette is in terrible need of easy problems. He (or she :eyes:) wants to make N number of problems before a certain deadline which is any time from 0:00 December 22 2019 to 23:59 December 22 2019. Since he is making so many questions, he wants to plan out the maximum amount of time he can spend making each problem. Therefore, he asked you, just because you're totally trash at programming, to make a program to help him plan.

He will spend an equal amount of time on each problem. He must also finish the problems at the start of the deadline minute.

Input Specification

The first line will contain N (1 \le N \le 10000), the number of problems he has to make.

The second line will contain the current time. It is guaranteed the current time will be between 0:00 December 22 2019 and 23:59 December 22 2019.
The third line will contain the deadline time. It is guaranteed the deadline time will be between 0:00 December 22 2019 and 23:59 December 22 2019, and strictly after the current time.

Output Specification

Print the maximum number of seconds he can spend on each problem, rounded to exactly three decimal places.

Examples of rounding:

  • 0.0001 -> 0.000
  • 0.0005 -> 0.001
  • 0.0014 -> 0.001
  • 0.0015 -> 0.002

Sample Input 1

2
12:00 December 22 2019
12:10 December 22 2019

Sample Output 1

300.000

Sample Input 2

1
0:00 December 22 2019
23:59 December 22 2019

Sample Output 2

86340.000

Comments

There are no comments at the moment.