본문 바로가기
Study/알고리즘

[백준 알고리즘] 4344번 Python

by Becoming a Hacker 2021. 10. 3.
반응형

문제 정보

 

제출 코드

count = int(input())
for i in range(count):
	data_list = list(map(int, input().split()))
	student_count = data_list.pop(0)
	avg_count = 0
	avg = sum(data_list, 0.0) / student_count

	for data in data_list:
		if(data>avg):
			avg_count += 1
	print("{:.3f}%".format(round(avg_count/student_count*100,3)))

댓글