Skip to content

Instantly share code, notes, and snippets.

@IKKO-Ohta
Last active July 1, 2017 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IKKO-Ohta/b422256e94ff5ce1a4bee8226fd988c3 to your computer and use it in GitHub Desktop.
Save IKKO-Ohta/b422256e94ff5ce1a4bee8226fd988c3 to your computer and use it in GitHub Desktop.
nums = [int(x) for x in input().split()] ; N = nums[0] ; K = nums[1]
rate = [int(x) for x in input().split()]
rate = sorted(rate)
takahashi = 0
for i in range(N-K,N):
takahashi = (takahashi + rate[i]) / 2
print(takahashi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment