Q=int(input()) w=1

a=0

for i in range(1, q):

print(i, end=" ")

print(q)

for i in range(q-1, 0, -1):

print(i, end=" ")




Вывод :

(при q=4)

1 2 3 4
3 2 1

а нужен

1 2 3 4 3 2 1
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.