Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- a = list(map(int , input().split()))
- x = int(input())
- a.sort()
- total = sum(a)
- for i in range(n):
- if total - a[i] >= x:
- total -= a[i]
- else:
- print("%.4f" % (total / (n - i)))
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement