题解 | #KiKi判断上三角矩阵#
KiKi判断上三角矩阵
https://www.nowcoder.com/practice/9a6786c28cdb45f9b991685f867b5d08
n = int(input()) li = [] flag = 0 for i in range(n): li += list(map(int, input().split()[0:i])) #获取所有对角线以下的数字 for j in li: if j != 0: flag = 1 print("NO") break if flag == 0: print("YES")