Commit 597c7e71 by bonnieyan

提交作业

parent 60d2c4a4
#
#
# class Solution(object):
#
# def find_radius(self, house, heaters):
#
#
#
# su = Solution()
# su.find_radius([1, 2, 3, 4], [1, 4])
class Matrix:
def topu_matrix(self, matrix):
for i in range(len(matrix)-1):
for j in range(len(matrix[i])-1):
if matrix[i+1][j+1] != matrix[i][j]:
return False
return True
m = Matrix()
matrix = [[1, 2, 3, 4], [5, 1, 2, 3], [9, 5, 1, 2]]
result = m.topu_matrix(matrix)
print(result)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment