热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_39787516
树洞小助手
5 年前
trueweixin_39787516

这是一段Python代码,判断能否组成三角形
def is_triangle(a, b, c):
if (a,b,c>0):
if ((a+b)>c)and((a+c)>b)and((b+c)>a):
return 1
else:
return 0
else:
return -1
a=int(input())
b=int(input())
c=int(input())
is_triangle(a,b,c)
这个代码运行时老是反回不了-1
帮忙看一下,谢谢😜

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条动态
立即登录