[Programmers] 바탕화면 정리
Python
def solution(wallpaper):
x = []
y = []
for i in range(len(wallpaper)):
for j in range(len(wallpaper[i])):
if wallpaper[i][j] == "#":
y.append(i)
x.append(j)
return [min(y), min(x), max(y) + 1, max(x) + 1]
댓글남기기