0
It works for 3 of 5 test but I can't see the 2 it doesn't work for and I can't find the issue. Problem military time.
2 Answers
+ 1
# Hi! You can compare your solution with mine:
print((lambda f: f"{f[0] + (-12 if f[0] == 12 and f[2] == 'AM' else 12 if f[0] != 12 and f[2] == 'PM' else 0):02}:{f[1]:02}")([int(i) if i.isdigit() else i for i in input().upper().replace(":", " ").split()]))
# My solution handle for example both lowercase an uppercase: am/AM etc.
# My solution handle the input: 01:34 AM. Your gives wrong answare: (001:34).
# Past in my code before (above) yours and input for example:
# 01:34 AM
# 01:34 AM
# and compare the results. Test with different cases to you find what is not same with the two solutions, and work out a solution.
0
Cuz whover made that decided that problem
12:20 AM = 24:20 instead of 00:20