Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
๐ ๋ฌธ์ ๋งํฌ
์์ธํธ์ค ๋ฌธ์
โ๏ธ ์์๋ ์๊ฐ
40๋ถ
โจ ์๋ ์ฝ๋
๋ฌธ์ ์ค๋ช
๊ทธ๋ฆผ์ผ๋ก ๋ํ๋ด์๋ฉด
์๋์ฝ๋
์ฝ๋ ์ค๋ช
๊ตฌํ์ ํ๊ธฐ ์ํด ๊ฐ์ฅ ์๊ฐ์ ๋ง์ด ์ด ๋ถ๋ถ์ด๋ค.
index = (index + K - 1) % len(people)
์ ํ์ฌ ์์น์์ K๋ฒ์งธ ๋ค์ ์์น๋ก ์ด๋ํ๋ค.์ ์ฒด ์ฝ๋
๐ ์๋กญ๊ฒ ์๊ฒ๋ ๋ด์ฉ
<์ซ์ , ์ซ์ , ์ซ์ ~ >
์ ๊ฐ์ ํ์์ผ๋ก ์ถ๋ ฅ๋์ด์ผ ํ๋๋ฐjoin
ํจ์๋ฅผ ์ฌ์ฉํ๊ฒ ๋๋ฉด ์์ ํ๋ํ๋๋ฅผ ํฉ์ณ์ ํ๋์ ๋ฌธ์์ด๋ก ๋ณํํ ์ ์์๋ค.