ํฌ์ธํ„ฐ 2

[C] ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์Šค์ฟจ_7์ฃผ์ฐจ ๋ฌธ์ œ 1: ๋ฐฐ์—ด ์›์†Œ์˜ ๊ธธ์ด

[1] ๋ฌธ์ œ ๋ฌธ์ œ ์„ค๋ช… ๋ฌธ์ž์—ด ๋ฐฐ์—ด strlist๊ฐ€ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. strlist ๊ฐ ์›์†Œ์˜ ๊ธธ์ด๋ฅผ ๋‹ด์€ ๋ฐฐ์—ด์„ retrunํ•˜๋„๋ก solution ํ•จ์ˆ˜๋ฅผ ์™„์„ฑํ•ด์ฃผ์„ธ์š”. ์ œํ•œ์‚ฌํ•ญ 1 ≤ strlist ์›์†Œ์˜ ๊ธธ์ด ≤ 100 strlist๋Š” ์•ŒํŒŒ๋ฒณ ์†Œ๋ฌธ์ž, ๋Œ€๋ฌธ์ž, ํŠน์ˆ˜๋ฌธ์ž๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ž…์ถœ๋ ฅ ์˜ˆ strlist result ["We", "are", "the", "world!"] [2, 3, 3, 6] ["I", "Love", "Programmers."] [1, 4, 12] ์ž…์ถœ๋ ฅ ์˜ˆ ์„ค๋ช… ์ž…์ถœ๋ ฅ ์˜ˆ #1 ["We", "are", "the", "world!"]์˜ ๊ฐ ์›์†Œ์˜ ๊ธธ์ด์ธ [2, 3, 3, 6]์„ returnํ•ฉ๋‹ˆ๋‹ค. ์ž…์ถœ๋ ฅ ์˜ˆ #2 ["I", "Love", "Programmers."]์˜..

[C] ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์Šค์ฟจ_5์ฃผ์ฐจ ๋ฌธ์ œ 1: ํŽธ์ง€

[1] ๋ฌธ์ œ ๋ฌธ์ œ ์„ค๋ช… ๋จธ์“ฑ์ด๋Š” ํ• ๋จธ๋‹ˆ๊ป˜ ์ƒ์‹  ์ถ•ํ•˜ ํŽธ์ง€๋ฅผ ์“ฐ๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ํ• ๋จธ๋‹ˆ๊ฐ€ ๋ณด์‹œ๊ธฐ ํŽธํ•˜๋„๋ก ๊ธ€์ž ํ•œ ์ž ํ•œ ์ž๋ฅผ ๊ฐ€๋กœ 2cm ํฌ๊ธฐ๋กœ ์ ์œผ๋ ค๊ณ  ํ•˜๋ฉฐ, ํŽธ์ง€๋ฅผ ๊ฐ€๋กœ๋กœ๋งŒ ์ ์„ ๋•Œ, ์ถ•ํ•˜ ๋ฌธ๊ตฌ message๋ฅผ ์ ๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ํŽธ์ง€์ง€์˜ ์ตœ์†Œ ๊ฐ€๋กœ๊ธธ์ด๋ฅผ return ํ•˜๋„๋ก solution ํ•จ์ˆ˜๋ฅผ ์™„์„ฑํ•ด์ฃผ์„ธ์š”. ์ œํ•œ์‚ฌํ•ญ ๊ณต๋ฐฑ๋„ ํ•˜๋‚˜์˜ ๋ฌธ์ž๋กœ ์ทจ๊ธ‰ํ•ฉ๋‹ˆ๋‹ค. 1 ≤ message์˜ ๊ธธ์ด ≤ 50 ํŽธ์ง€์ง€์˜ ์—ฌ๋ฐฑ์€ ์ƒ๊ฐํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. message๋Š” ์˜๋ฌธ ์•ŒํŒŒ๋ฒณ ๋Œ€์†Œ๋ฌธ์ž, ‘!’, ‘~’ ๋˜๋Š” ๊ณต๋ฐฑ์œผ๋กœ๋งŒ ์ด๋ฃจ์–ด์ ธ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž…์ถœ๋ ฅ ์˜ˆ message result "happy birthday!" 30 "I love you~" 20 ์ž…์ถœ๋ ฅ ์˜ˆ ์„ค๋ช… ์ž…์ถœ๋ ฅ ์˜ˆ #1 message์˜ ๊ธ€์ž ์ˆ˜๊ฐ€ 15๊ฐœ๋กœ ์ตœ์†Œ ๊ฐ€๋กœ 30cm์˜..