题解 | 上三角矩阵判定

上三角矩阵判定

https://www.nowcoder.com/practice/f5a29bacfc514e5a935723857e1245e4

import sys

n = int(input())
res = "YES"
for i in range(n):
    list_in = list(map(int, input().split()))
    for j in range(n):
        if i > 0 and j < i and list_in[j] != 0:
            res = "NO"
print(res)

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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