-Code
grade = [0, 4, 11, 23, 40, 60, 77, 89, 96, 100, 101]
res = [0] * 9
n = int(input())
points = sorted(list(map(int, input().split())), reverse=True)
set_point = sorted(list(set(points)), reverse=True)
total, temp, idx = 0, 0, 0
for p in set_point:
temp += points.count(p)
total += points.count(p)
if grade[idx + 1] <= total:
res[idx] += temp
temp = 0
while grade[idx + 1] <= total:
idx += 1
for el in res:
print(el)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 30215번 Age Expression (0) | 2024.06.16 |
---|---|
[백준/파이썬] 13456번 Richard Hamming (1) | 2024.06.15 |
[백준/파이썬] 7360번 Undercut (1) | 2024.06.13 |
[백준/파이썬] 1269번 대칭 차집합 (0) | 2024.06.12 |
[백준/파이썬] 26676번 Wybór zadań (0) | 2024.06.11 |