From a74a550b2641f28527fa3c96b78037906c6573ce Mon Sep 17 00:00:00 2001 From: Jiye Ryu <70010181+ryeya@users.noreply.github.com> Date: Tue, 17 Jan 2023 12:25:21 +0900 Subject: [PATCH] =?UTF-8?q?Create=20=EA=B8=B0=EB=8A=A5=EA=B0=9C=EB=B0=9C?= =?UTF-8?q?=5F=EB=A5=98=EC=A7=80=EC=98=88.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60\234_\353\245\230\354\247\200\354\230\210.py" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "4\354\243\274\354\260\250/2)\352\270\260\353\212\245\352\260\234\353\260\234/\352\270\260\353\212\245\352\260\234\353\260\234_\353\245\230\354\247\200\354\230\210.py" diff --git "a/4\354\243\274\354\260\250/2)\352\270\260\353\212\245\352\260\234\353\260\234/\352\270\260\353\212\245\352\260\234\353\260\234_\353\245\230\354\247\200\354\230\210.py" "b/4\354\243\274\354\260\250/2)\352\270\260\353\212\245\352\260\234\353\260\234/\352\270\260\353\212\245\352\260\234\353\260\234_\353\245\230\354\247\200\354\230\210.py" new file mode 100644 index 0000000..a5ba266 --- /dev/null +++ "b/4\354\243\274\354\260\250/2)\352\270\260\353\212\245\352\260\234\353\260\234/\352\270\260\353\212\245\352\260\234\353\260\234_\353\245\230\354\247\200\354\230\210.py" @@ -0,0 +1,14 @@ +import math + +def solution(progresses, speeds): + progresses = [math.ceil((100 - a) / b) for a, b in zip(progresses, speeds)] + answer = [] + th = 0 + + for idx in range(len(progresses)): + if progresses[idx] > progresses[th]: + answer.append(idx - th) + th = idx + answer.append(len(progresses) - th) + + return answer