[Programmers] n^2 배열 자르기
Python
def solution(n, left, right):
answer = []
for i in range(left, right+1):
answer.append(max(divmod(i, n)) + 1)
return answer
def solution(n, left, right):
answer = []
for i in range(left, right+1):
answer.append(max(divmod(i, n)) + 1)
return answer
댓글남기기