nums = []
for i in range(1, 11):
nums.append(int(input("%i-е число: "%i)))
t = [i for i in nums if i%3 == 0]
print(" + ".join(str(i) for i in t), "=", sum(t))
nums = []
for i in range(1, 11):
nums.append(int(input("%i-е число: "%i)))
t = [i for i in nums if i%3 == 0]
print(" + ".join(str(i) for i in t), "=", sum(t))