fork download
  1. def f1():
  2. x=input().split()
  3. x1= []
  4. for i in x:
  5. x1.append(int(i))
  6. y=len(x1)-1
  7. avg=0
  8. num=0
  9. add=0
  10. if x1[0]==y:
  11. for i in range(y):
  12. if i>=0 and i<=100:
  13. for i in x1[1:]:
  14. add +=i
  15. avg = add/y
  16. for i in x1[1:]:
  17. if i > avg:
  18. num +=1
  19. k=num /x1[0] * 100
  20. return k
  21.  
  22. a=int(input())
  23. if a>=1 and a<=1000:
  24. x=[]
  25. for i in range(a):
  26. b=f1()
  27. x.append(b)
  28. for i in x:
  29. print('%.3f%' %i,"%")
Runtime error #stdin #stdout #stderr 0.04s 9532KB
stdin
5
5 50 50 70 80 100
7 100 95 90 80 70 60 50
3 70 90 80
3 70 90 81
9 100 99 98 97 96 95 94 93 91
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 29, in <module>
ValueError: incomplete format