[Programmers] n^2 배열 자르기
Python ~~~python def solution(n, left, right): answer = [] for i in range(left, right+1): answer.append(max(divmod(i, n)) + 1)
Python ~~~python def solution(n, left, right): answer = [] for i in range(left, right+1): answer.append(max(divmod(i, n)) + 1)
Python ~~~python def solution(n,a,b): answer = 0 while a != b: answer += 1 a, b = (a + 1) // 2, (b + 1) // 2
Python def solution(numbers): number = list(map(str, numbers)) number.sort(key = lambda x : x * 3, reverse = True) return str(int(''.join(nu...
Python def solution(number, k): answer = [] for i in number: while k > 0 and answer and answer[-1] < i: answer.pop() ...
Python def solution(n): a, b = 0, 1 for i in range(0, n): a, b = b, a + b return b % 1234567