전체 글(331)
-
[Python 문제풀이] 16일차
Day_16 Intro Q22. avoidObstacles You are given an array of integers representing coordinates of obstacles situated on a straight line. Assume that you are jumping from the point with coordinate 0 to the right. You are allowed only to make jumps of the same length represented by some integer. Find the minimal length of the jump enough to avoid all the obstacles. 제출 코드 def avoidObstacles(inputArra..
2020.07.24 -
[Python 문제풀이] 15일차
Day_15 Intro Q22. avoidObstacles You are given an array of integers representing coordinates of obstacles situated on a straight line. Assume that you are jumping from the point with coordinate 0 to the right. You are allowed only to make jumps of the same length represented by some integer. Find the minimal length of the jump enough to avoid all the obstacles. 제출 코드 from math import gcd def sol..
2020.07.23 -
[Python 문제풀이] 14일차
Day_14 Intro Q21. isIPv4Address An IP address is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. There are two versions of the Internet protocol, and thus two versions of addresses. One of them is the IPv4 address. 제출 코드 def isIPv4Address(inputString): inputDivide = inputString.split('...
2020.07.22 -
[Python 문제풀이] 13일차
Day_13 Intro Q21. isIPv4Address An IP address is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. There are two versions of the Internet protocol, and thus two versions of addresses. One of them is the IPv4 address. 제출 코드 def isIPv4Address(inputString): dotidxlist = [] if len(inputString) >=..
2020.07.21 -
[Python 문제풀이] 12일차
Day_12 Intro Q19. areEquallyStrong Call two arms equally strong if the heaviest weights they each are able to lift are equal. Call two people equally strong if their strongest arms are equally strong (the strongest arm can be both the right and the left), and so are their weakest arms. Given your and your friend's arms' lifting capabilities find out if you two are equally strong. 제출 코드 d..
2020.07.20 -
[Python 문제풀이] 11일차
Day_11 Intro Q17. arrayChange You are given an array of integers. On each move you are allowed to increase exactly one of its element by one. Find the minimal number of moves required to obtain a strictly increasing sequence from the input. 제출 코드 def arrayChange(inputArray): AddNum = 0 for i in range(len(inputArray) -1): if inputArray[i] >= inputArray[i+1]: AddNum += inputArray[i] + 1 - inputArr..
2020.07.19