Python 80分,dalao帮忙看看可以不

P5735 【深基7.例1】距离函数

zzzxns1 @ 2023-03-07 00:06:06

q = []#存留个参数
w = []#存三个边长

for i in range(3):#存参数
    a,b = map(int,input().split())
    q.append(a)
    q.append(b)

def juli(x1,y1,x2,y2):#算边长
    dic = pow(((x2-x1)**2+(y2-y1)**2),0.5)
    w.append(dic)

def zhou(a,b,c):#算周长
    print('%.2f'%(a+b+c))

juli(q[0],q[1],q[2],q[3])
juli(q[0],q[1],q[4],q[5])
juli(q[2],q[3],q[4],q[5])
zhou(w[0],w[1],w[2])

by P2354450581 @ 2023-04-03 19:27:46

 a,b = map(int,input().split())

将int改为eval即可

改后:

 a,b = map(eval,input().split())

|