Advertisement
Guest User

Translate plz

a guest
Feb 18th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. answer = 0
  2. points = []
  3. number = int(input())
  4. for i in range(number):
  5.   yes = int(input())
  6.   if points == []:
  7.     points.append(yes)
  8.     answer += 1
  9.   else:
  10.     for h in range(len(points)):
  11.       if yes >= points[h]:
  12.         points.insert(h, yes)
  13.         answer += h+1
  14.         break
  15.       elif h == len(points)-1:
  16.         points.append(yes)
  17.         answer += h+2
  18.         break
  19. final = answer/len(points)
  20. print(format(final,'.2f'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement