Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = [0] * len(scores)
- for score in scores:
- count[score]++
- medal_count = [0] * 3 //{gold, silver, bronze}
- for score in xrange(600, -1, -1):
- if medal_count[0] < len(scores)/12:
- medal_count[0] += count[score]
- if medal_count[1] < len(scores)/4:
- medal_count[1] += count[score]
- if medal_count[2] + score > len(scores)/2:
- break
- medal_count[2] += count[score]
Add Comment
Please, Sign In to add comment