Guest User

Untitled

a guest
Dec 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. count = [0] * len(scores)
  2. for score in scores:
  3. count[score]++
  4. medal_count = [0] * 3 //{gold, silver, bronze}
  5. for score in xrange(600, -1, -1):
  6. if medal_count[0] < len(scores)/12:
  7. medal_count[0] += count[score]
  8. if medal_count[1] < len(scores)/4:
  9. medal_count[1] += count[score]
  10. if medal_count[2] + score > len(scores)/2:
  11. break
  12. medal_count[2] += count[score]
Add Comment
Please, Sign In to add comment