[Silver IV] Title: donstructive, Time: 108 ms, Memory: 45836 KB -BaekjoonHub
This commit is contained in:
37
백준/Silver/30618. donstructive/README.md
Normal file
37
백준/Silver/30618. donstructive/README.md
Normal file
File diff suppressed because one or more lines are too long
8
백준/Silver/30618. donstructive/donstructive.py
Normal file
8
백준/Silver/30618. donstructive/donstructive.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import sys
|
||||||
|
input = sys.stdin.readline
|
||||||
|
|
||||||
|
n = int(input())
|
||||||
|
odds = list(range(1, n + 1, 2)) # 1,3,5,...
|
||||||
|
evens = list(range(2, n + 1, 2))[::-1] # ...,4,2 (내림차순)
|
||||||
|
ans = odds + evens
|
||||||
|
print(*ans)
|
||||||
Reference in New Issue
Block a user