0

what's wrong in my code it says 2test cases fail

https://www.sololearn.com/coach/70?ref=app time=input() p="" for i in time: if i==":": break else: p+=i if "AM"in time: print(p+time[-6:-3]) else: print(str(int(p)+12)+time[-6:-3])

1st Oct 2020, 8:45 AM
Sangeetha
1 Respuesta
0
You forgot to pad 0 when time is AM. For example input = 1:15 AM The output should be 01:15 rather than 1:15.
1st Oct 2020, 9:26 AM
你知道規則,我也是
你知道規則,我也是 - avatar