1 条题解

  • 0
    @ 2025-9-17 18:27:36

    注意用不用else三角形可能会误判为钝角三角形

    from math import sqrt,ceil,gcd,log;re=lambda:map(int,input().strip().split())
    
    a, b, c = sorted(list(re()))
    if a + b <= c:
        print("不是三角形")
    else:
        if a ** 2 + b ** 2 == c ** 2:
            print("直角三角形")
        if a ** 2 + b ** 2 > c ** 2:
            print("锐角三角形")
        if a ** 2 + b ** 2 < c ** 2:
            print("钝角三角形")
        if a == b or b == c:
            print("等腰三角形")
            if a == b == c:
                print("等边三角形")
    
    • 1

    信息

    ID
    1107
    时间
    1000ms
    内存
    256MiB
    难度
    8
    标签
    (无)
    递交数
    20
    已通过
    6
    上传者