Coding-Riddles/enraged.py

17 lines
315 B
Python
Raw Normal View History

2025-01-20 11:37:00 -05:00
columns = int(input(""))
murders_acceptable = 2
row1 = input("")
row2 = input("")
for cell1, cell2 in zip(row1, row2):
if cell1 == "S" and cell2 == "S":
murders_acceptable -= 1
if murders_acceptable == -1:
break
if murders_acceptable == -1:
print("NO")
else:
print("YES")