A = list(map(int, input().split()))
print(A)
k = 0
for a in A:
if a % 3 == 0:
k += a
print(k)
sum = 0
sum += a
print(sum)
Объяснение:
A = list(map(int, input().split()))
print(A)
k = 0
for a in A:
if a % 3 == 0:
k += a
print(k)
A = list(map(int, input().split()))
print(A)
sum = 0
for a in A:
if a % 3 == 0:
sum += a
print(sum)
Объяснение: