0

Help in military time challenge

I can't get past hidden test #3 and #5 if anyone can help me improve my code. Thanks https://code.sololearn.com/cdL7dwHV8JT2/?ref=app https://code.sololearn.com/cdL7dwHV8JT2/?ref=app

26th Nov 2020, 3:03 PM
Luhan
Luhan - avatar
5 Respuestas
+ 2
For input 12:00 AM output needed is 00:00 For 12:00 PM output is 12:00 For single digit hour 1:00 AM make it 01:00 double digit...
26th Nov 2020, 3:24 PM
Jayakrishna 🇮🇳
0
Oh, that's what is wrong then... I'll fix it thanks.
26th Nov 2020, 3:25 PM
Luhan
Luhan - avatar
0
Fixed, thanks!
26th Nov 2020, 3:41 PM
Luhan
Luhan - avatar
0
It fixes but "what if input is 12:12 AM"? Is this result correct as 00:12? If not try to code for any type of case.. You're welcome...
26th Nov 2020, 3:49 PM
Jayakrishna 🇮🇳
0
Oh, right. Fixed this too, thanks again.
26th Nov 2020, 3:59 PM
Luhan
Luhan - avatar