Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Week7] 김재원 : 프린터 큐, 요세푸스 문제, 크리스마스 선물, 스택 수열, 쇠막대기 #34

Merged
merged 5 commits into from
Jul 15, 2022

Conversation

ashwon12
Copy link
Member

@ashwon12 ashwon12 commented Jul 8, 2022

📒 Issue Number

linked issue #30


💎 문제 해결

프린터 큐 :⭕️ 
요세푸스 문제 :⭕️ 
크리스마스 선물 :⭕️ 
스택 수열 :⭕️ 
쇠막대기 :🔺 

🔥 특이사항/질문

쇠막대기 풀다가 안되서 구글링 해서 풀었습니다 ㅜㅅㅜ!

val (n,k) = readln().split(" ").map { it.toInt()}
val yo = arrayListOf<Int>()
val answer : ArrayList<Int> = arrayListOf()
repeat(n){ yo.add(it+1)}
Copy link
Member

@soopeach soopeach Jul 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5, 7 번째 줄 합쳐서 val yo = (1..n).toMutableList() 로 하셔도 좋을 것 같아요!

yo.removeFirst()
}

println(answer.joinToString(", ","<",">"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 것 배워갑니다..!

@ashwon12 ashwon12 merged commit 0c8620f into main Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants