๋ชฉ๋ก์•”ํ˜ธ ํ•ด๋… (1)

๐Ÿค ์€์ง€log ๐Ÿค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ์•”ํ˜ธ ํ•ด๋…

ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค Lv.0 - ์•”ํ˜ธ ํ•ด๋… ๐Ÿ’š ๋ฌธ์ œ์„ค๋ช… ๊ตฐ ์ „๋žต๊ฐ€ ๋จธ์“ฑ์ด๋Š” ์ „์Ÿ ์ค‘ ์ ๊ตฐ์ด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์•”ํ˜ธ ์ฒด๊ณ„๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•„๋ƒˆ์Šต๋‹ˆ๋‹ค. ์•”ํ˜ธํ™”๋œ ๋ฌธ์ž์—ด cipher๋ฅผ ์ฃผ๊ณ ๋ฐ›์Šต๋‹ˆ๋‹ค. ๊ทธ ๋ฌธ์ž์—ด์—์„œ code์˜ ๋ฐฐ์ˆ˜ ๋ฒˆ์งธ ๊ธ€์ž๋งŒ ์ง„์งœ ์•”ํ˜ธ์ž…๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด cipher์™€ ์ •์ˆ˜ code๊ฐ€ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ์ฃผ์–ด์งˆ ๋•Œ ํ•ด๋…๋œ ์•”ํ˜ธ ๋ฌธ์ž์—ด์„ returnํ•˜๋„๋ก solution ํ•จ์ˆ˜๋ฅผ ์™„์„ฑํ•ด์ฃผ์„ธ์š”. ๐Ÿ’š ์ œํ•œ์กฐ๊ฑด 1 ≤ cipher์˜ ๊ธธ์ด ≤ 1,000 1 ≤ code ≤ cipher์˜ ๊ธธ์ด cipher๋Š” ์†Œ๋ฌธ์ž์™€ ๊ณต๋ฐฑ์œผ๋กœ๋งŒ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ณต๋ฐฑ๋„ ํ•˜๋‚˜์˜ ๋ฌธ์ž๋กœ ์ทจ๊ธ‰ํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ’š ํ’€์ด function solution(cipher, code) { const answer = []; for ( let i = code - 1; i ..