Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. n=int(input())
  2. a=list(map(int,input().split()))
  3. m=int(input())
  4. b=list(map(int,input().split()))
  5. p=['None']*10**6
  6. for i in range(m):
  7. if p[b[i]]=='None':
  8. l=a.count(b[i])
  9. p[b[i]]=l
  10. print(l)
  11. else:
  12. print(p[b[i]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement