๋ชฉ๋ก๊ธฐ๋Šฅ๊ฐœ๋ฐœ (1)

Focus On Develop ๐ŸคŸ๐ŸคŸ

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค] ๊ธฐ๋Šฅ๊ฐœ๋ฐœ

๋จผ์ € ๊ฐ ์ž‘์—…์ด ๋ช‡์ผ์„ ํ•„์š”๋กœ ํ•˜๋Š”์ง€ ์•Œ์•„์•ผ ํ•œ๋‹ค. (100-progress) / speed ๋ฅผ ํ•˜๋ฉด ๋˜๋Š”๋ฐ, ์ด๊ฒŒ ๋”ฑ ๋‚˜๋ˆ„์–ด ๋–จ์–ด์ง€์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ํ•˜๋ฃจ๊ฐ€ ๋” ํ•„์š”ํ•˜๋‹ค. ์ด๋ ‡๊ฒŒ ์ž‘์—…์‹œ๊ฐ„์ด ๊ณ„์‚ฐ๋œ Queue๋ฅผ ๊ฐ€์ง€๊ณ  ๋ฉ”์ธ ๋กœ์ง์„ ์‹œ์ž‘ํ•œ๋‹ค. ์ œ์ผ ๋จผ์ € ๋ฐฐํฌ๋˜์–ด์•ผ ํ•˜๋Š” ์ž‘์—…์˜ ์ž‘์—…์ด ์™„๋ฃŒ๊ฐ€ ๋ ๋•Œ๊นŒ์ง€ ์‹œ๊ฐ„์„ ํ˜๋Ÿฌ ๋ณด๋‚ธ๋‹ค.(ํ•„์š”๋กœ ํ–ˆ๋˜ ์ž‘์—…์ผ์ˆ˜์—์„œ 1์”ฉ ๋นผ๊ธฐ) ๊ทธ๋Ÿฌ๋‹ค ์šฐ์„ ์ˆœ์œ„๊ฐ€ ๊ฐ€์žฅ ๋†’์€ ์ž‘์—…์ด ๋ฐฐํฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ฒŒ ๋˜๋ฉด ๊ทธ ๋’ค๋กœ ๋ฐฐํฌ๊ฐ€ ๊ฐ€๋Šฅํ•œ ์ž‘์—…(ํ•„์š”๋กœ ํ•˜๋Š” ์ž‘์—…์ผ์ˆ˜ [Int] { var workDay: [Int] = [] var res: [Int] = [] var cnt = 0 for i in 0...progresses.count-1 { if (100 - progresses[i]) % speeds [i] == 0 ..