백준 알고리즘/링크드 리스트5 백준 11866번 파이썬 a,b = map(int, input().split())list = [i for i in range(1,(a+1))]ans=[0]*aindex=0delete = b-1while (len(list)!=0): while delete >= len(list): delete = delete - len(list) ans[index] = list[delete] del list[delete] delete =delete + (b-1) index+=1 print("") else: print(ans[i],end=", ") 2018. 9. 17. 이전 1 2 다음