코딩테스트 공부/백준 문제
백준 [Python] 4344번: 평균은 넘겠지
연디연디
2021. 10. 21. 17:52
728x90
✨ 풀이과정
1
2
3
4
5
6
7
8
9
10
11
12
13
|
n = int(input())
for i in range(n):
case = list(map(int,input().split()))
average = sum(case[1:]) / case[0]
student = 0
for j in case[1:]:
if j >= average:
student += 1
ratio = student/case[0]*100
print(f'{ratio:.3f}%')
|
cs |
4344번: 평균은 넘겠지
대학생 새내기들의 90%는 자신이 반에서 평균은 넘는다고 생각한다. 당신은 그들에게 슬픈 진실을 알려줘야 한다.
www.acmicpc.net
728x90