题解 | 上三角矩阵判定
上三角矩阵判定
https://www.nowcoder.com/practice/f5a29bacfc514e5a935723857e1245e4
n= int(input())
bool = True
for i in range(0,n):
a = list(map(int,input().split()))
for j in range (i):
if a[j] !=0:
bool = False
if bool == False:
print('NO')
else:
print('YES')
查看4道真题和解析