Skip to content

[OstenHun] WEEK 03 Solutions#2435

Merged
OstenHun merged 3 commits intoDaleStudy:mainfrom
OstenHun:main
Mar 21, 2026
Merged

[OstenHun] WEEK 03 Solutions#2435
OstenHun merged 3 commits intoDaleStudy:mainfrom
OstenHun:main

Conversation

@OstenHun
Copy link
Copy Markdown
Member

@OstenHun OstenHun commented Mar 16, 2026

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

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

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

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

Important

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

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

Copy link
Copy Markdown
Contributor

@hwi-middle hwi-middle left a comment

Choose a reason for hiding this comment

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

์•ˆ๋…•ํ•˜์„ธ์š”. C++๋กœ ํ’€์ดํ•œ PR์ด ์˜ฌ๋ผ์˜จ ๊ฒƒ์„ ๋ณด๊ณ  ๋ฐ˜๊ฐ€์›€์„ ๋А๊ปด ์ €๋„ ํ—ˆ๊ฒ์ง€๊ฒ PR์„ ์˜ฌ๋ ค์„œ Reviewer๋กœ ๋‹ฌ๋ ค์™”์Šต๋‹ˆ๋‹ค. ๋ฆฌ๋ทฐ ์‹œ์ ์—๋Š” 2๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์…จ๋Š”๋ฐ, ์ผ๋‹จ Approve ์ฒ˜๋ฆฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋‚˜๋จธ์ง€ ๋ฌธ์ œ๋„ ํ•ด๊ฒฐํ•˜์‹  ํ›„ ๋ฆฌ๋ทฐ ์›ํžˆ์‹œ๋ฉด ํŽธํ•˜๊ฒŒ ๋ฉ˜์…˜์ฃผ์„ธ์š”!

Comment on lines +37 to +40
// unsigned int answer = 0;
// for (int i = 0; i < 32; i++) {
// if ((n >> i) & 1) answer++;
// }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

๊ฐ€๋…์„ฑ์€ ์ด ์ชฝ์ด ๋” ์ข‹์€ ๊ฒƒ ๊ฐ™๊ธฐ๋Š” ํ•œ๋ฐ,

Comment on lines +29 to +34
unsigned int answer = 0;
while(n>0) {
if (n & 1)
answer++;
n = n >> 1;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

์š” ๋ถ€๋ถ„์˜ ๊น”๋”ํ•จ์ด ๋ˆˆ๊ธธ์„ ๋„๋Š”๊ฑด ๋ถ€์ •ํ•  ์ˆ˜ ์—†๋„ค์š”.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

๋™์˜ํ•ฉ๋‹ˆ๋‹ค.. ์ •๋ง ๊น”๋”ํ•œ ๊ฑฐ ๊ฐ™์•„์š”.
32๋ฒˆ๋ณด๋‹ค ์ ๊ฒŒ ํ™•์ธํ•˜๋Š” ๋ฒ•์ด ์—†์„๊นŒ? ํ•˜๋‹ค๊ฐ€ ์ž‘์„ฑํ•˜๊ฒŒ ๋๋„ค์š”

์ €์—๊ฒŒ ํฐ ์ถฉ๊ฒฉ์„ ์ค€๊ฑด ๋งˆ์ง€๋ง‰ ํ’€์ด์˜€๋„ค์š”. ์ œ๊ฐ€ ์ƒ๊ฐํ•œ ๊ฑด ์•„๋‹ˆ๊ณ  AI์™€ ๋Œ€ํ™” ํ•˜๋‹ค ๋ณด๋‹ˆ ์•Œ๊ฒŒ ๋œ ํ’€์ด์ธ๋ฐ
์ •๋ง ๋ฉ‹์ง„ ํ’€์ด ๊ฐ™์Šต๋‹ˆ๋‹ค

Comment on lines +74 to +75
if (tolower(s[left]) != tolower(s[right]))
return false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Number of 1 Bits ๋ฌธ์ œ์˜ ์—ฌ๋Ÿฌ ํ•ด๋‹ต์„ ์ œ์ถœํ•˜์‹  ๊ฑธ ๋ณด๋‹ˆ... ํ˜น์‹œ ๋น„ํŠธ ํŠธ๋ฆญ์„ ์ข‹์•„ํ•˜์‹œ๋‚˜์š”? ๐Ÿ‘€ ๊ทธ๋ ‡๋‹ค๋ฉด ์ด๋ฏธ ์•„์‹ค ๊ฒƒ ๊ฐ™์ง€๋งŒ, ASCII ์ฝ”๋“œ์—์„œ A๊ฐ€ 65์ด๊ณ  a๊ฐ€ 97๋กœ 32๋งŒํผ ์ฐจ์ด๋‚˜๋Š” ๊ฒƒ์„ ์ด์šฉํ•˜์—ฌ ๋น„ํŠธ ์—ฐ์‚ฐ ํ•œ ๋ฒˆ์œผ๋กœ ๋Œ€์†Œ๋ฌธ์ž ๋ณ€ํ™˜์„ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌผ๋ก , ์ˆซ์ž ์ž…๋ ฅ์—๋Š” ์จ๋จน์„ ์ˆ˜ ์—†์–ด์„œ ์ด ๋ฌธ์ œ์—์„œ๋Š” std::tolower๋ฅผ ์จ์•ผํ•˜์ง€๋งŒ ์ด๋Ÿฐ ๋ถ€๋ถ„์— ํฅ๋ฏธ๋ฅผ ๋А๋ผ์‹ค ๊ฒƒ ๊ฐ™์•„ ๋‚จ๊ฒจ๋ด…๋‹ˆ๋‹ค :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

์ด์ „์— ๋ฐฐ์› ๋‹ค๋Š” ๊ธฐ์–ต์€ ์žˆ์œผ๋‚˜ ๊ธฐ์–ต์˜ ์ €ํŽธ์— ์žˆ๋˜ ๋‚ด์šฉ์ด๋„ค์š” ใ…Žใ…Ž; ๋น„ํŠธ ์—ฐ์‚ฐ์€ ์–ธ์ œ ๋ด๋„ ์ •๋ง ๋ฉ‹์ง„ ๊ฑฐ ๊ฐ™์•„์š”
๋ฆฌ๋ทฐ ์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ •๋ง ๋งŽ์€ ๋„์›€์ด ๋˜๋„ค์š”! ์˜์ƒ๋„ ์ž˜ ๋ดค์Šต๋‹ˆ๋‹ค!!

@OstenHun OstenHun merged commit a00972b into DaleStudy:main Mar 21, 2026
1 check 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.

2 participants