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
x = input()
f=(x[0])
s=(x[1])
t=(x[3])
r=(x[4])
k=(x[6])
l=(x[7])
y=(f+s)
c=(t+r)
pmam=(k+l)
w1=int(y)
w2=int(c)
if w1 < 12 and w1 > 0:
if pmam == "PM":
rand1 = w1 + 12
else:
rand1= w1
elif w1 == 12:
if pmam == "AM":
rand1 = w1+12
else:
rand1 = w1
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run