from statistics import mean
a = []
for i in range(int(input('a = ')), int(input('b = ')) + 1):
if i % 3 == 0:
a += [i]
print('Ср. арифм. всех чисел:', mean(a))
a=int(input())
b=int(input())
mas=[i for i in range(a,b+1) if i%3==0]
print(sum(mas)/len(mas))
from statistics import mean
a = []
for i in range(int(input('a = ')), int(input('b = ')) + 1):
if i % 3 == 0:
a += [i]
print('Ср. арифм. всех чисел:', mean(a))
a=int(input())
b=int(input())
mas=[i for i in range(a,b+1) if i%3==0]
print(sum(mas)/len(mas))