divmod

    [Python | week1-3] ์ •๋ ฌ | Sort ํ•จ์ˆ˜ | divmod ํ•จ์ˆ˜ | ์žฌ๊ท€ ์•Œ๊ณ ๋ฆฌ์ฆ˜

    Week1-3 [์˜ค๋Š˜์˜ ํ•™์Šต] 1. ์ •๋ ฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜(sort, sorted ํ•จ์ˆ˜) 2. divmod ํ•จ์ˆ˜ 3. ์žฌ๊ท€ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ~ํ˜ผ์žฃ๋ง~ ๋ฐฑ์ค€์ด ์ต์ˆ™ํ•ด์„œ์ธ์ง€ ์•„๋‹ˆ๋ฉด ๋ฌด์–ธ๊ฐ€ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•ด์•ผ ๋œ๋‹ค๋Š” ๊ฐ•๋ฐ• ๊ด€๋… ๋•Œ๋ฌธ์ธ์ง€ ์š”์ฆ˜ ๋ฌธ์ œ๊ฐ€ ์ž˜ ํ’€๋ฆฌ์ง€ ์•Š๋Š”๋‹ค ๋ฌธ์ œ ํ•ด๊ฒฐ ์ฝ”๋“œ๋ฅผ ๋ณด๋ฉด "์™€ ์ด๊ฑฐ๋‹ค" ์‹ถ์€๋ฐ ๋ง‰์ƒ ์Šค์Šค๋กœ ํ•˜๋ ค๊ณ  ํ•˜๋ฉด ๋ง‰๋ง‰ํ•˜๊ณ  ๋‹ต๋‹ตํ•˜๋‹ค ์ด์ „์—๋„ ์ด๋Ÿฐ ๊ฒฝํ—˜์ด ์žˆ๋Š”๋ฐ, ๊พธ์ค€ํžˆ ๋ฌธ์ œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ๊ณต๋ถ€ํ•˜๋‹ค ๋ณด๋ฉด ํ•ด๊ฒฐ ํ๋ฆ„์„ ์Šค์Šค๋กœ ๋– ์˜ฌ๋ฆด ์ˆ˜ ์žˆ์œผ๋ฆฌ๋ผ ๋ฏฟ์–ด ์˜์‹ฌ์น˜ ์•Š๋Š”๋‹ค 1. ์ •๋ ฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜(sort, sorted ํ•จ์ˆ˜) ์ •๋ ฌ์€ ์ฝ”๋”ฉ์„ ์‹œ์ž‘ํ•˜๋Š” ๋ถ„๋“ค๋„ ์ž˜ ์•„๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋ผ๊ณ  ์ƒ๊ฐํ•œ๋‹ค. ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ์ข…๋ฅ˜์˜ ์ •๋ ฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์žˆ์ง€๋งŒ Python์˜ ๋‚ด์žฅํ•จ์ˆ˜ Sort์™€ Sorted๋ฅผ ํ•จ๊ป˜ ์‚ดํŽด๋ณด๋„๋ก ํ•˜์ž ํŒŒ์ด์ฌ์ด ์ œ๊ณตํ•˜๋Š” ์ž๋ฃŒ๊ตฌ์กฐ..