ํฐ์คํ ๋ฆฌ ๋ทฐ
๋ฐ์ํ
์ด ๋ฌธ์ ๋ ๊ฝค ๊ฐ๋จํ๊ฒ ํ์ด ์กํ๋ค.
from math import ceil
def solution(progresses, speeds):
answer = []
temp = 0
task = 1
for a, b in zip(progresses, speeds):
day = ceil((100 - a) / b)
if temp > day:
task += 1
else:
answer.append(task)
task = 1
temp = day
return answer
progresses = [93, 30, 55, 4]
speeds = [1, 30, 5, 95]
print(solution(progresses,speeds))
๋ฐ๋ก ๊ตฌํ
๋ผ์ ์คํจ
๋ค์ ์๊ฐํด๋ณด์
from math import ceil
def solution(progresses, speeds):
answer = []
temp = ceil((100-progresses[0])/speeds[0])
task = 0
for a, b in zip(progresses, speeds):
day = ceil((100 - a) / b)
if temp >= day:
task += 1
else:
answer.append(task)
temp = day
task = 1
answer.append(task)
return answer
progresses = [93, 30, 55]
speeds = [1, 30, 5]
print(solution(progresses,speeds))
ํคใ ใ ใ ใ ใ ใ ใ ใ ํคํคํคํคํคํค
์ฝ๋ ๋ฆฌ๋ทฐ
์ดํดํ๊ธฐ ํ๋ ๋ณ์๋ช ์ ์ฌ์ฉํ์ง ์๋๋ค. ๋ช ํํ ์๋ฏธ์ ๋ณ์๋ช ์ ์ฌ์ฉํ์
ํ ์คํธ ์ฝ๋ ์ง์ด๋ค.
// ์คํผ๋ ์ดํฐ๋....?
๋ฐ์ํ
'๊ธฐ๋ก > ์ฝํ ์คํฐ๋ ๊ธฐ๋ก' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์ต๋ ์ฉ๋์ด ์ ํด์ง FIFO ํ ํด๋์ค (0) | 2020.07.13 |
---|---|
๋๋งต๊ฒ (0) | 2020.07.12 |
๋ฐฐ์ ๋น์ฉ ์ต์ํ (0) | 2020.07.12 |
๋ฌธ์์ด ์์ถ (0) | 2020.07.11 |
1์ฃผ์ฐจ (0) | 2020.07.11 |
๋๊ธ
๊ณต์ง์ฌํญ
์ต๊ทผ์ ์ฌ๋ผ์จ ๊ธ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
- Total
- Today
- Yesterday
๋งํฌ
TAG
- ๊ฒ์๋ฌผ์กฐํ
- ๊ฒ์ํ ์ญ์
- ๋ถํธ ์๋์์ฑ
- ๊ฒ์ํ ์กฐํ
- typeAliases
- ์ ์ฒด๊ฒ์๋ฌผ ์กฐํ
- Algorithm
- java ํ๊ฒฝ๋ณ์
- ๊ฒ์ํ๋ง๋ค๊ธฐ
- ์ดํด๋ฆฝ์ค ์ค์น
- mysql์ค์น
- ๊ฐ๋ฐํ๊ฒฝ๊ตฌ์ถ
- Java
- ์๋ฐ
- ์๋ฃ๊ตฌ์กฐ
- ์๊ณ ๋ฆฌ์ฆ
- tomcat์ค์น
- ์จ๋ฆฌ์์ค
- ๋ณ๋ช ์ฒ๋ฆฌ
- ์คํ๋ง๋ถํธ ์๋์์ฑ
- ๊ฐ๋ฐ
- ์ดํด๋ฆฝ์ค ํ๊ธ ์ธ์ฝ๋ฉ
- ๊ฒ์๋ฌผ ์ญ์
- java jdk ์ค์น
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
๊ธ ๋ณด๊ดํจ