题解 | 上三角矩阵判定

上三角矩阵判定

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



全部评论

相关推荐

冲鸭2024:亚信不去也罢
投递亚信科技(中国)有限公司等公司6个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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