+ 4

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

5th Feb 2020, 5:01 PM
elvisreal
elvisreal - avatar
3 Respuestas
+ 3
Thanks mann
5th Feb 2020, 5:19 PM
elvisreal
elvisreal - avatar
+ 3
Isabel Yea glad I was able to help, totally agreed with you on adding of some zeros..
5th Feb 2020, 5:50 PM
elvisreal
elvisreal - avatar
+ 1
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!
5th Feb 2020, 5:36 PM
Isabel
Isabel - avatar