i//n
,i%n
여기까지는 알았는데.. max라고?def solution(n, left, right):
arr = [[0] * n for _ in range(n)]
for i in range(n):
for j in range(i+1):
arr[i][j] = i+1
arr[j][i] = i+1
answer = []
for i in arr:
answer += i
return answer[left:right+1]
def solution(n, left, right):
answer = []
for i in range(left,right+1):
answer.append(max(i//n,i%n)+1)
return answer