Skip to content

[sojae] WEEK 14 solutions#2327

Merged
TonyKim9401 merged 1 commit intoDaleStudy:mainfrom
sojae:main
Feb 14, 2026
Merged

[sojae] WEEK 14 solutions#2327
TonyKim9401 merged 1 commit intoDaleStudy:mainfrom
sojae:main

Conversation

@sojae
Copy link
Contributor

@sojae sojae commented Feb 11, 2026

๋‹ต์•ˆ ์ œ์ถœ ๋ฌธ์ œ

์ž‘์„ฑ์ž ์ฒดํฌ ๋ฆฌ์ŠคํŠธ

  • Projects์˜ ์˜ค๋ฅธ์ชฝ ๋ฒ„ํŠผ(โ–ผ)์„ ๋ˆŒ๋Ÿฌ ํ™•์žฅํ•œ ๋’ค, Week๋ฅผ ํ˜„์žฌ ์ฃผ์ฐจ๋กœ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.
  • ๋ฌธ์ œ๋ฅผ ๋ชจ๋‘ ํ‘ธ์‹œ๋ฉด ํ”„๋กœ์ ํŠธ์—์„œ Status๋ฅผ In Review๋กœ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.
  • ์ฝ”๋“œ ๊ฒ€ํ† ์ž 1๋ถ„ ์ด์ƒ์œผ๋กœ๋ถ€ํ„ฐ ์Šน์ธ์„ ๋ฐ›์œผ์…จ๋‹ค๋ฉด PR์„ ๋ณ‘ํ•ฉํ•ด์ฃผ์„ธ์š”.

๊ฒ€ํ† ์ž ์ฒดํฌ ๋ฆฌ์ŠคํŠธ

Important

๋ณธ์ธ ๋‹ต์•ˆ ์ œ์ถœ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋‹ค๋ฅธ ๋ถ„ PR ํ•˜๋‚˜ ์ด์ƒ์„ ๋ฐ˜๋“œ์‹œ ๊ฒ€ํ† ๋ฅผ ํ•ด์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค!

  • ๋ฐ”๋กœ ์ด์ „์— ์˜ฌ๋ผ์˜จ PR์— ๋ณธ์ธ์„ ์ฝ”๋“œ ๋ฆฌ๋ทฐ์–ด๋กœ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.
  • ๋ณธ์ธ์ด ๊ฒ€ํ† ํ•ด์•ผํ•˜๋Š” PR์˜ ๋‹ต์•ˆ ์ฝ”๋“œ์— ํ”ผ๋“œ๋ฐฑ์„ ์ฃผ์„ธ์š”.
  • ํ† ์š”์ผ ์ „๊นŒ์ง€ PR์„ ๋ณ‘ํ•ฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์Šน์ธํ•ด์ฃผ์„ธ์š”.

Copy link
Contributor

@ppxyn1 ppxyn1 left a comment

Choose a reason for hiding this comment

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

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค. ๋๊นŒ์ง€ ํ™”์ดํŒ…ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค!



class Solution:
def countBits(self, n: int) -> List[int]:
Copy link
Contributor

Choose a reason for hiding this comment

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

๋น„ํŠธ์—ฐ์‚ฐ๊ณผ DP๋ฅผ ํ™œ์šฉํ•œ ํ’€์ด๋กœ ๋ณด์ž…๋‹ˆ๋‹ค. ์‹œ๊ฐ„ ๋ณต์žก๋„๋ฅผ O(n)์œผ๋กœ ์ค„์˜€๋‹ค๋Š” ์ ์ด ์ธ์ƒ์ ์ด์—ˆ์Šต๋‹ˆ๋‹ค.
์ €๊ฐ™์€ ๊ฒฝ์šฐ์—๋Š” ๋น„ํŠธ ์—ฐ์‚ฐ์ด ์ต์ˆ™ํ•˜์ง€ ์•Š์•„ bin() ๊ธฐ๋ฐ˜์œผ๋กœ ์นด์šดํŒ…ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ํ’€์—ˆ๋Š”๋ฐ, ํ•ด๋‹น ํ’€์ด๋ฅผ ํ†ตํ•ด ๋น„ํŠธ ์—ฐ์‚ฐ์„ ํ™œ์šฉํ•˜๋ฉด ๋” ํšจ์œจ์ ์œผ๋กœ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์„ ๋ฐฐ์šธ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
๋˜ํ•œ ์ฃผ์„ ์˜ˆ์‹œ๋ฅผ ์ž˜ ์ž‘์„ฑํ•ด ์ฃผ์…”์„œ ๋กœ์ง์„ ์ดํ•ดํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

@TonyKim9401 TonyKim9401 merged commit 86110c7 into DaleStudy:main Feb 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants