728x90
반응형
문제출처: https://school.programmers.co.kr/learn/courses/30/lessons/12905
풀이:
def solution(board):
answer = 1 if 1 in board[0] or 1 in board[-1] else 0
for m in range(1,len(board)):
for n in range(1,len(board[0])):
if board[m][n] == 1:
board[m][n] = min(board[m-1][n], board[m-1][n-1], board[m][n-1]) + 1
if board[m][n] > answer:
answer = board[m][n]
return answer ** 2
https://dev-note-97.tistory.com/107
못 풀겠어서 이 분 풀이를 봤다,,, 수학문제푸는거 같다,,
반응형
댓글