Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #3)
- s = 0
- n = int(input())
- for i in range(n):
- x = int(input())
- s += x
- print(s / n)
- #Ответ:4.2
- #4)
- n = int(input())
- m = int(input())
- a = []
- for i in range(n):
- x = int(input())
- a.append(x)
- print(a[m])
- #Ответ: 32
- #5)
- n = int(input())
- a = []
- s = 0
- for i in range(n):
- x = int(input())
- a.append(x)
- if i % 2 == 0:
- s += a[i]
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement