Code challenge Military Time

I have made attempt to solve it, passed test 1 and 2, but failed test 3 and 5 which is hidden, pls any improvement to my code is welcomed, because I have tried hard for days yet failed.. https://code.sololearn.com/ccOpHW8Vlk3I/?ref=app Thanks solved it

2/5/2020 5:01:36 PM


4 Answers

New Answer


1:30 AM = 01:30 XX:XX


Thanks mann


Isabel Yea glad I was able to help, totally agreed with you on adding of some zeros..


I have just solved this, thanks to you! I also had trouble with tests 3 and 5, and you made me wonder what situations we both did not address. The answer is 1am to 9am. In military time, these should be 01:00, etc, with a zero added at the beginning. I added the zero to these cases and it worked!