ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1025. Democracy in Danger

My solution to the problem in python
Posted by 4mj4d 21 Oct 2017 22:42
#Democracy in Danger
#Written on October 21, 2017
#Author Amjad

from math import sqrt

group = 0
b = []
votes = 0
while True:
    try:
        group =  int(input())
        b = ([int(a) for a in input().split()])
        b.sort()
    except EOFError:
        for i in range(0, round( (group +1) / 2)):
            votes += (int(b[i]) + 1) / 2
        print(int(votes))
        break

Edited by author 21.10.2017 22:42