Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- stress = {}
- for i in range(n):
- word = input()
- lower_word = word.lower()
- if lower_word not in stress:
- stress[lower_word] = set()
- stress[lower_word].add(word)
- text = input().split()
- error = 0
- for word in text:
- lower_word = word.lower()
- if lower_word in stress and word not in stress[lower_word] or \
- sum(map(str.isupper, word)) != 1:
- error += 1
- print(error)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement