Created
January 4, 2020 08:20
-
-
Save ShinJJang/520e82a6eb5eaa63d10fb929f269a230 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def solution(progresses, speeds): | |
days = [] | |
for idx in range(len(progresses)): | |
day = math.ceil((100 - progresses[idx]) / speeds[idx]) | |
days.append(day) | |
result = [] | |
max_day = days[0] | |
count = 0 | |
for day in days: | |
# print(idx, days, max_day, count) | |
if day > max_day: | |
max_day = day | |
result.append(count) | |
count = 1 | |
else: | |
count += 1 | |
result.append(count) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
다른 사람의 풀이를 보고 인상 깊었던 것
math.ceil 없이 올림을 쓰려고 한거 같네요.