0
Problem in military time...
I am amazed that i am unable to pass all tests while my code is giving correct o/p for all types of input. Stuck for 2 hours but unable to figure out what's going wrong. Please look in to it and tell me ..... https://code.sololearn.com/ceDN50eRQHpa/?ref=app
3 Respostas
+ 5
All times from 12:00 AM to 9:59 AM are incorrect for their output. Also, as Shadow states 12:00 PM is incorrect
3:45 AM
should output;
03:45
not
3:45
+ 2
I always have to look this up, but as far as I know, 12 AM is midnight or 00:00, while 12 PM is midday or 12:00. Your code has them switched, which is probably the reason for the two failed test cases.
+ 1
For input => Expected output
12:00 AM => 00:00
1:00 AM => 01:00
12:00 PM => 12:00