Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def num_up(x):
- b = 0
- for i in x:
- if i.isupper() == True:
- b += 1
- return b
- A = {}
- M = 0
- N = int(input())
- for i in range(N):
- inp = input()
- b = inp.lower()
- if b in A:
- A[b].append(inp)
- else: A[b] = [inp]
- text = input().split()
- for i in text:
- l = i.lower()
- if l in A:
- if i in A[l]:
- pass
- else: M += 1
- else:
- if num_up(i) == 1:
- pass
- else: M += 1
- print(M)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement