Advertisement
sigmachto

Untitled

Jul 2nd, 2023
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2. #3)
  3. s = 0
  4. n = int(input())
  5. for i in range(n):
  6. x = int(input())
  7. s += x
  8. print(s / n)
  9. #Ответ:4.2
  10.  
  11. #4)
  12. n = int(input())
  13. m = int(input())
  14. a = []
  15. for i in range(n):
  16. x = int(input())
  17. a.append(x)
  18. print(a[m])
  19. #Ответ: 32
  20.  
  21.  
  22. #5)
  23. n = int(input())
  24. a = []
  25. s = 0
  26. for i in range(n):
  27. x = int(input())
  28. a.append(x)
  29. if i % 2 == 0:
  30. s += a[i]
  31. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement