萌新求助 第五个为什么过不去呀
查看原帖
萌新求助 第五个为什么过不去呀
146911
anime楼主2022/1/26 10:55
a1,b1,c1 = input().split()
a = int(a1)
b = int(b1)
c = int(c1)
a2 = pow(a,2)
b2 = pow(b,2)
c2 = pow(c,2)
if a<=b<=c or b<=a<=c:
	if a+b<=c:
		print("Not triangle")
	else:
		if a2+b2==c2:
			print("Right triangle")
			print("Acute triangle")
			if a2==b2:
				print("Isosceles triangle")	 
		elif a2+b2>c2:
			print("Acute triangle")
			if a==b:
				print("Isosceles triangle")
				if b==c:
					print("Equilateral triangle")
		elif a2+b2<c2:
			print("Obtuse triangle")
			if a==b:
				print("Isosceles triangle")
elif a<=c<=b or c<=a<=b:
	if a+c<=b:
		print("Not triangle")
	else:
		if a2+c2==b2:
			print("Right triangle")
			print("Acute triangle")
			if a2==c2:
				print("Isosceles triangle")	 
		elif a2+c2>b2:
			print("Acute triangle")
			if a==c:
				print("Isosceles triangle")
				if b==c:
					print("Equilateral triangle")
		elif a2+c2<b2:
			print("Obtuse triangle")
			if a==c:
				print("Isosceles triangle")
elif b<=c<=a or c<=b<=a:
	if b+c<=a:
		print("Not triangle")
	else:
		if b2+c2==a2:
			print("Right triangle")
			print("Acute triangle")
			if b2==c2:
				print("Isosceles triangle")	 
		elif b2+c2>a2:
			print("Acute triangle")
			if b==c:
				print("Isosceles triangle")
				if a==c:
					print("Equilateral triangle")
		elif b2+c2<a2:
			print("Obtuse triangle")
			if b==c:
				print("Isosceles triangle")
2022/1/26 10:55
加载中...