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:])
+ 3
x = input().zfill(8)
if x[-2:] == "PM":
x = str(int(x[:2]) + 12) + x[2:]
print(x[:5])
+ 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)
0
Mom and pops used to always say "because I said so".... Looks like that page does not exist.