python 第四个测试点没过

P5717 【深基3.习8】三角形分类

看着有点乱,看看我的吧 既然都排序了,那就化简下判断条件吧 ```python side = list(map(int, input().split())) side.sort() if sum(side[:2])>side[-1]: if side[0]**2+side[1]**2==side[-1]**2: print("Right triangle") elif side[0]**2+side[1]**2>side[-1]**2: print("Acute triangle") else: print("Obtuse triangle") if side[0]==side[1] or side[1]==side[-1]: print("Isosceles triangle") if side[0]==side[-1]: print("Equilateral triangle") else: print("Not triangle") ```
by Winds_Land @ 2024-01-23 15:18:02


|