We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You are absolutely right Sumit. It doesn't check for the sanity of the input. Since, the problem statement mentions that we'll be provided with "time" in proper AM/PM format, hence, the input won't contain min>59 or sec>59.
In my opinion, the problem emphasizes more upon Input/Output format rather than processing of data. Its given in "Warmup" section, probably, to familiarize new-coders with various input/output requirements. Though, other sections of "Algorithms" domain do contain problems with rigorous processing requirements, which might interest you more.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
You are absolutely right Sumit. It doesn't check for the sanity of the input. Since, the problem statement mentions that we'll be provided with "time" in proper AM/PM format, hence, the input won't contain min>59 or sec>59.
In my opinion, the problem emphasizes more upon Input/Output format rather than processing of data. Its given in "Warmup" section, probably, to familiarize new-coders with various input/output requirements. Though, other sections of "Algorithms" domain do contain problems with rigorous processing requirements, which might interest you more.