题解 | 上三角矩阵判定

上三角矩阵判定

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')            



全部评论

相关推荐

未知的命运:重新优化一下项目吧,不然你没机会了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务