Editorial for New Year's '18 P1 - Happy New Year!


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.

Author: Kirito

We can convert h and m into seconds and add them to s. The number of seconds the task takes is smod60 and the number of minutes s60mod60, and the number of hours is s3600mod12. Then, subtract that from 12:00:00 to get the answer. Note that the hours output should be between 0 and 11.

Time Complexity: O(1)


Comments

There are no comments at the moment.