#BOJ 4344 평균은 넘겠지
c = int(input())
for _ in range(c):
scores = list(map(int, input().split()))
avg = sum(scores[1:]) / scores[0]
count = 0
for x in scores[1:]:
if x > avg:
count += 1
print(f'{count/scores[0]*100:.3f}')
파이썬 소수점 자릿수 제한 방법
f'문자열 {변수:.3f} 입니다'
f'{count/scores[0]*100:.3f}
"문자열 {:.3f} 문자열 {:.3f}".format(값1, 값2)
print("{:.3f}".format(count/scores[0]*100))
round(반올림하고자 하는 값, 자릿수)
print(round(count/scores[0]*100, 3))