from collections import deque
n,k=map(int,input().split())
arr=deque()
for x in range(1,n+1):
arr.append(x)
arr2=[]
for y in range(n):
arr.rotate(-(k-1))
arr2.append(arr[0])
arr.remove(arr[0])
print('<{}>'.format(', '.join(map(str,arr2))))
'알고리즘 > 백준' 카테고리의 다른 글
백준-1193번(분수찾기)-python3 (0) | 2023.11.24 |
---|---|
백준-1181번(단어 정렬)-python3 (0) | 2023.11.24 |
백준-1157번(단어 공부)-python3 (0) | 2023.11.24 |
백준-1152번(단어의 개수)-python3 (0) | 2023.11.24 |
백준-1546번(평균)-python3 (0) | 2023.11.24 |