Answers
Answered by
0
Explanation:
# if there is a G between $ and T or not
inp = input()
st="G"
sta=0
for n in inp:
if n=="T":
if st=="$":
print("ALARM")
sta=1
break
else:
st="T"
elif n=="$":
if st=="T":
print("ALARM")
sta=1
break
else :
st="$"
elif n=="G":
st="G"
sta=0
if sta==0:
print("quiet")
Similar questions