Skip to content

Commit

Permalink
Create 2944.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-im-gabriel authored Apr 3, 2023
1 parent a6c2ad8 commit b110049
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 2944.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
full_list = []
old_list = []
count = 0

for _ in range(int(input())):
if not full_list:
full_list = ['F', 'A', 'C', 'E']
new_list = input().split()
if new_list == full_list[-4:][::-1]:
full_list = full_list[:-4]
count += 1
else:
full_list.extend(new_list)

print(count)

0 comments on commit b110049

Please sign in to comment.