16th Apr 2022, 6:32 PM
DANY32
4 Answers
+ 1
v=input() clock= v[:6] suff= v[6:] if suff=="AM": print(clock) else: print(str(int(clock[:2])+12)+clock[2:])
16th Apr 2022, 6:57 PM
Mohamed Ayaou
+ 3
x = input().zfill(8) if x[-2:] == "PM": x = str(int(x[:2]) + 12) + x[2:] print(x[:5])
16th Apr 2022, 7:28 PM
JaScript
JaScript - avatar
+ 1
ĐšĐŸĐŽ txt = list(txt) minuts = txt[-5] + str(txt[-4]) hours = "" if len(txt) == 8 and txt[-2] == "A": hours = str(txt[0]) + str(txt[1]) elif txt[-2] != "A" and len(txt) == 8: hours = str(txt[0]) + str(txt[1]) hours = int(hours) + 12 elif len(txt) == 7 and txt[-2] == "A": hours = str(txt[0]) elif len(txt) == 7 and txt[-2] == "P": hours = int(hours) + 12 minuts = str(txt[3]) + str(txt[4]) hours = hours + ":" + minuts print(hours)
16th Apr 2022, 6:48 PM
DANY32
0
Mom and pops used to always say "because I said so".... Looks like that page does not exist.
16th Apr 2022, 6:46 PM
William Owens
William Owens - avatar