Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- G = int(input())
- if 1 < G < 1000:
- gavetas = []
- inputGavetas = []
- numGavetas = 0
- for i in range(0, G):
- estado = input()
- if estado == "#":
- inputGavetas.append(1)
- if i - 1 >= 0:
- if inputGavetas[i - 1] == 0:
- gavetas.append(0)
- else:
- gavetas.append(1)
- else:
- gavetas.append(1)
- elif estado == "o":
- inputGavetas.append(0)
- gavetas.append(0)
- for i in range(0, len(gavetas)):
- numGavetas += gavetas[i]
- print(numGavetas)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement