Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
64
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. tip=0
  3.  
  4. colvo=0
  5. g=[]
  6. for i in range(0,n):
  7. m=input()
  8. g.append(m)
  9. g.sort()
  10. for j in g:
  11. if g.count(j)==1:
  12. g.remove(j)
  13. z=g[0]
  14. for ij in range (1,len(g)):
  15. if z==g[ij]:
  16. tip+=1
  17. else:
  18. z=g[ij]
  19. colvo=len(g)-(tip*2-1)
  20. print(tip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement