Editorial for DMOPC '14 Contest 1 P4 - Perfect Timing


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.

Once you calculated the number of seconds required by subtracting, there were two ways of formatting it as specified by the problem statement:

  1. Using for/while loops along with the modulus operator to obtain the number of hours/days/months, etc. An array specifying the number of days in each month is also necessary and don't forget about leap years. Remember to include leading zeros in your output.

  2. This method involved the use of the DateTime package in Java or Python, which made the solution very simple.


Comments

There are no comments at the moment.