fork download
  1. # your code goes here
  2. n=int(input())
  3. arr=[]
  4. q=int(input())
  5. hashing=[0]*51
  6. for i in range(n):
  7. arr.append(int(input()))
  8. hashing[arr[i]]+=1
  9. query=int(input())
  10. for i in range(q):
  11. count=hashing[query]
  12. print(count)
Success #stdin #stdout 0.1s 14188KB
stdin
5
1 
1 
1 
1 
1 
1
1
stdout
5