Код:
k = int(input())
list = [8, 16, 24, 32]
if k == 1:
print(list[0])
elif k == 2:
print(list[0], end=' ')
print(list[1])
elif k == 3:
print(list[1], end=' ')
print(list[2])
elif k == 4:
print(list[2], end=' ')
print(list[3])
Код:
k = int(input())
list = [8, 16, 24, 32]
if k == 1:
print(list[0])
elif k == 2:
print(list[0], end=' ')
print(list[1])
elif k == 3:
print(list[0], end=' ')
print(list[1], end=' ')
print(list[2])
elif k == 4:
print(list[0], end=' ')
print(list[1], end=' ')
print(list[2], end=' ')
print(list[3])