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+'%')
Re: Завалено на 2 тесте! Язык питон 3
Posted by Flairie 30 Dec 2018 18:16
при 100% проголосовавших выводится 100.0%.

Edited by author 30.12.2018 18:16
Re: Завалено на 2 тесте! Язык питон 3
Posted by Andrey 13 Oct 2019 21:11
Попробуй вариант где ответ - 100%