Baekjoon Case

[파이썬 / 백준 4344번] 평균은 넘겠지

Scarlett_C 2021. 11. 13. 12:08
728x90

https://www.acmicpc.net/problem/4344

T=int(input())
for i in range(T):
    arry=list(map(int,input().split()))
    N=int(arry[0])
    avg=(sum(arry)-N)/N
    count=0
    for j in range(1,N+1):
        if int(arry[j])>avg:
            count+=1
    result=round(float((count/N)*100),3)
    print('%.3f'%result+"%")
728x90