Leetcode题目(1)————顺时针打印矩阵
import numpy as npa=np.array([[1,2,3,4,100], [5,6,7,8,23], [10,1,12,13,26], [10,12,13,15,45], [3,56,34,12,13]])upper=0bottom=a.shape[0]-1right=a.shape[1]-1left=0while a.sum()>0: for i in range(l
原创
2020-11-24 20:46:39 ·
85 阅读 ·
0 评论