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.
actualli i had made some programmes based on simple input and output data , but due to "failing of many cases : rather than case#0 " , it become necessary for me to bring out all possible 'input ways' .
well thanks to u for giving important trick :
it helped me to bring out my code from 100 lines to just 50 lines . keep giving that new ideas please .
Sure ! Anytime.
I'm glad that it helped !!! :)
Ya.The printf trick was really useful.