Editorial for WC '18 Contest 2 J2 - This Message will Self-Destruct


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.

Let m be the numerical value (09) of the first character of S. We can obtain this value by subtracting the ASCII value of 0 from the ASCII value of that character. Similarly, let s1 and s2 be the numerical values of the third and fourth characters, respectively. Then, m corresponds to minutes, s1 to tens of seconds, and s2 to single seconds. The total number of seconds therefore comes out to 60m+10s1+s2.


Comments

There are no comments at the moment.