내가 짠 코드
def organizingContainers(container):
# Write your code here
row_sums = []
for item in container:
row_sums.append(sum(item))
col_sums = [0] * len(container)
for i in range(len(container)):
for j in range(len(container)):
col_sums[j] += container[i][j]
if (sorted(row_sums) == sorted(col_sums)):
return "Possible"
else:
return "Impossible"
설명
로직