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 1263. Elections

Завалено на 2 тесте! Язык питон 3
Posted by Gosha 11 Oct 2018 00:28
m = []
g = []
d, b = map(int, input().split(' '))
for i in range(1, b+1):
    n = int(input())
    m.append(n)
for i in range(1, d+1):
    g.append(i)
for i in range(d):
    f = 0
    for y in range(b):
        if m[y] == g[i]:
            f += 1/b*100
    f = round(f, 2)
    a = str(f)
    if len(a) == 4:
        print(a+'0%')
    else:
        print(a+'%')