PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#m = "12:05 AM"
#m = "12:34 PM"
#m = "0:34 PM"
#m = "1:15 AM"
#m = "11:00 PM"
#m = "11:00 AM"
#m = "1:15 PM"
#m = "00:15 AM"
m = input()
s = m.strip().replace(" ", ":").split(":")
if s[2] == "PM":
if s[0]=="12":
print(f'12:{s[1]:0>2}')
else:
print(f'{int(s[0])+12}:{s[1]:0>2}')
else:
if s[0]=="12":
print(f'00:{s[1]:0>2}')
else:
print(f'{s[0]:0>2}:{s[1]:0>2}')
'''
https://en.wikipedia.org/wiki/24-hour_clock
Keep learning & happy coding :D
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run