์ฝ”๋”ฉํ…Œ์ŠคํŠธ๐Ÿ’ก

๋ฌธ์ œํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ๊ธฐ๋Šฅ๊ฐœ๋ฐœhttps://school.programmers.co.kr/learn/courses/30/lessons/42586 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”.programmers.co.kr ์ฝ”๋“œfrom collections import dequedef solution(progresses, speeds): progresses_que = deque(progresses) speeds_que = deque(speeds) answer = [] while progresses_que: while progresses_que[0] = 100: ..
๋ฌธ์ œํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์˜์ƒhttps://school.programmers.co.kr/learn/courses/30/lessons/42578 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”.programmers.co.kr ํ‚ค์›Œ๋“œ๊ฐ€ ํ•ด์‹œ์ธ๋งŒํผ, ์ตœ๋Œ€ํ•œ ํ•ด์‹œ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ฌธ์ œ๋ฅผ ํ’€์—ˆ๋‹ค. ์ฝ”๋“œdef solution(clothes): closet = {} for name, kind in clothes: if kind in closet.keys(): closet[kind] += [name] else: closet[kind] = [nam..
๋ฌธ์ œํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ „ํ™”๋ฒˆํ˜ธ๋ชฉ๋กhttps://school.programmers.co.kr/learn/courses/30/lessons/42577 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”.programmers.co.kr ์ฒ˜์Œ ์ฝ”๋“œdef solution(phone_book): for choice_phonephone in phone_book: # ํฐ๋ฒˆํ˜ธ ์„ ํƒ for phone in phone_book: # ๋น„๊ตํ•  ํฐ๋ฒˆํ˜ธ if choice_phonephone == phone: # ๋น„๊ตํ•  ํฐ๋ฒˆํ˜ธ๊ฐ€ ์ž์‹ ํฐ๋ฒˆ์ด๋ฉด ํŒจ์Šค ..
๋•ก๋•ก๐Ÿ‘ฉ๐Ÿป‍๐Ÿ’ป
'์ฝ”๋”ฉํ…Œ์ŠคํŠธ๐Ÿ’ก' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (3 Page)