Problem:
Distance Write a program which calculates the distance between two points P1(x1, y1) and P2(x2, y2). Input Four real numbers x1, y1, x2 and y2 are given in a line. Output Print the distance in real number. The output should not contain an absolute error greater than 10 -4 . Sample Input 0 0 1 1 Sample Output 1.41421356

Solution (Python):
import math
xa,ya,xb,yb=map(float, input().split())
print("{0:.8f}".format(math.sqrt( (xa-xb)**2 + (ya-yb)**2 )))

Solution (Python):
import math
x1,y1,x2,y2=input().split()
x1=float(x1)
y1=float(y1)
x2=float(x2)
y2=float(y2)
r=math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
print(r)

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5)

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print('%f' %(math.sqrt((x1-x2)**2 + (y1-y2)**2)))

Solution (Python):
import math

x1,y1,x2,y2 = map(float,input().split())

print(math.sqrt((x2-x1)**2 + (y2-y1)**2))

Solution (Python):
import math

str = input().split(' ')
x1 = float(str[0])
x2 = float(str[1])
y1 = float(str[2])
y2 = float(str[3])

result = (x1-y1)*(x1-y1) + (x2-y2)*(x2-y2)
result = math.sqrt(result) if result != 0 else 0

print('%.6f'%result)

Solution (Python):
data = map(float, raw_input().split())
x1 = data[0]
y1 = data[1]
x2 = data[2]
y2 = data[3]

distance = ((x1 - x2)**2 + (y1 - y2)**2)**0.5
print("{:.8f}".format(distance))

Solution (Python):
import math
def main():
    x1, y1, x2, y2 = map(float, input().split())
    b = abs(x2 - x1)
    h = abs(y2 - y1)
    d = math.sqrt(b ** 2 + h ** 2)
    print("{0:.8f}".format(d))


if __name__ == "__main__":
    main()

Solution (Python):
import math

x1, y1, x2, y2 = map(float, raw_input().split())
print round(math.sqrt((x1 - x2)**2 + (y1 - y2)**2), 5 )

Solution (Python):
a,b,c,d=list(map(float,input().split()))
print('%.5f'%(((c-a)**2+(b-d)**2)**.5))

Solution (Python):
from math import sqrt

def main():

    x1, y1, x2, y2 = map(float, input().split())
    print(sqrt(abs(x2-x1)**2 + abs(y2-y1)**2))


main()

Solution (Python):
import math
x1,y1,x2,y2 = map(float, input().split())
print(math.sqrt(pow(x2-x1, 2) + pow(y2-y1, 2)))

Solution (Python):
import math

x1, y1, x2, y2 = [float(s) for s in input().split()]
print(math.sqrt((math.fabs(x1 - x2) ** 2) + (math.fabs(y1 - y2) ** 2)))

Solution (Python):
x1,y1,x2,y2 = map(float, input().split())
print( ((x1-x2)**2 + (y1-y2)**2) **0.5 )

Solution (Python):


import math

def main():

    x1, y1, x2, y2 = map(float, input().split())

    print(math.sqrt(pow(x2-x1, 2) + pow(y2-y1, 2)))

if __name__ == '__main__':
    main()

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(float((abs(x1-x2)**2)+abs(y1-y2)**2)**(1/2))

Solution (Python):
v,w,x,y=map(float,input().split())
print(float((abs(v-x)**2)+abs(w-y)**2)**(1/2))

Solution (Python):
a, b, c, d = map(float, input().split())                                    
print(pow((c - a)**2 + (d - b)**2, 0.5))

Solution (Python):
import math


def main():
    x1, y1, x2, y2 = map(float, input().split())

    ans = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
a,b,c,d=map(float,input().split())
print(((a-c)**2+(b-d)**2)**0.5)

Solution (Python):
import math
l = input().split()
x1 = float(l[0])
y1 = float(l[1])
x2 = float(l[2])
y2 = float(l[3])

a = pow((x2 - x1), 2) + pow((y2 - y1), 2)
ans = math.sqrt(a)
print(ans)

Solution (Python):
o,p,q,r = [float(i) for i in input().split()]
print(format(((q-o)**2+(r-p)**2)**(1/2), '.8f'))

Solution (Python):
x1,y1,x2,y2 = map(float,input().split())
distance = ( (x1 - x2)**2 + (y1 - y2)**2 )**(1/2) 
print('{}'.format(distance))

Solution (Python):
import math

x1, y1, x2, y2 = map(float, input().split())

print(math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2)))

Solution (Python):
from math import *
x1, y1, x2, y2 = map(float, input().split())
print(hypot(x1 - x2, y1 - y2))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
z = math.sqrt((x1-x2)**2 + (y1-y2)**2)
print(z)

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5)

Solution (Python):
import math
def hoge(a):
    return a * a
x1, y1, x2, y2 = map(float, input().split())
print (math.sqrt(hoge(math.fabs(x1-x2)) + hoge(math.fabs(y1-y2))))

Solution (Python):

import math
array = map(float,raw_input().split())
x1 = array[0]
y1 = array[1]
x2 = array[2]
y2 = array[3]
answer = math.sqrt(math.pow(x2 - x1,2) + math.pow(y2 - y1,2))
print answer

Solution (Python):
data = list(map(float, input().split()))
print(((data[2]-data[0])**2+(data[3]-data[1])**2)**0.5)

Solution (Python):
from math import hypot
a, b, c, d = map(float, input().split())
print(hypot(a-c, b-d))

Solution (Python):
x1,y1,x2,y2 = [float(x) for x in input().split()]
print(((x1-x2)**2+(y1-y2)**2)**(1/2))

Solution (Python):



import sys

x1, y1, x2, y2 = map(float, sys.stdin.readline().split())
print(round(((x2-x1)**2 + (y2-y1)**2) ** 0.5, 6))

Solution (Python):
x,y,xx,yy=map(float, input().split())
print('%5f'%((x-xx)**2+(y-yy)**2)**0.5)

Solution (Python):
import math

def distance(a, b):
    dx = abs(a[0]-b[0])
    dy = abs(a[1]-b[1])
    return math.sqrt(dx*dx + dy*dy)

if __name__ == '__main__':
    x1, y1, x2, y2 = map(float, input().split())
    print(distance((x1, y1), (x2, y2)))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print("{:4f}".format(math.sqrt((x2-x1)**2 + (y2-y1)**2)))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print("{:.5f}".format(((x2-x1)**2 + (y2-y1)**2)**0.5))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print("{0:f}".format(math.sqrt((x1-x2)**2.0 + (y1-y2)**2.0)))

Solution (Python):
x = list(map(float, input().split(' ')))
ans = pow((pow(x[0]-x[2], 2) + pow(x[1]-x[3], 2)), 0.5)
print("{0:.8f}".format(ans))

Solution (Python):
import math
val = str(input()).split()

numList = list(map(float, list(val)))

print(math.sqrt(((numList[2]-numList[0]) ** 2) + ((numList[3]-numList[1]) ** 2)))

Solution (Python):
import math


def distance(p1, p2):
    """returns the distance between p1 and p2

    >>> d = distance((0, 0), (1, 1))
    >>> print("{0:.5f}".format(d))
    1.41421
    """
    (x1, y1) = p1
    (x2, y2) = p2
    return math.sqrt((x2-x1)**2 + (y2-y1)**2)


def run():
    x1, y1, x2, y2 = [float(i) for i in input().split()]

    print(distance((x1, y1), (x2, y2)))


if __name__ == '__main__':
    run()

Solution (Python):
from math import sqrt
x1, y1, x2, y2 = map(float, input().split())  
 
print(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))

Solution (Python):

import math

x1, y1, x2, y2 = (float(i) for i in input().split())
print(math.sqrt((x2-x1)**2+(y2-y1)**2))

Solution (Python):
n = input().strip()

x1,y1,x2,y2 = [ float(i) for i in n.split() ]

dx = abs(x1 - x2)
dy = abs(y1 - y2)

dist = ( dx**2 + dy**2) ** 0.5

print(dist)

Solution (Python):
import math
x1, x2, y1, y2 = map(float, input().split())
print(math.sqrt((y1 - x1) ** 2 + (y2 - x2) ** 2))

Solution (Python):
import math

data = input().split()
x1 = float(data[0])
x2 = float(data[2])
y1 = float(data[1])
y2 = float(data[3])
x3 = x1 - x2 if x1 > x2 else x2 - x1
y3 = y1 - y2 if y1 > y2 else y2 - y1
print("%.8f" % math.sqrt(x3 * x3 + y3 * y3))

Solution (Python):
x1,y1,x2,y2 = map(float,input().split())
dist = ((x2-x1)**2+(y2-y1)**2)**(1/2)
print(dist)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
import math

x1,y1,x2,y2 = tuple(float(n) for n in input().split())
D = math.sqrt((x2-x1)**2 + (y2-y1)**2)
print("{:.8f}".format(D))

Solution (Python):
import math, re

x1, y1, x2, y2 = [float(n) for n in re.split(r"\s+", input().strip())]
print("%f" % (math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
print(math.sqrt((x2-x1)**2+(y2-y1)**2))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
X = x1 - x2
Y = y1 - y2
print('{:.5f}'.format(math.sqrt(X * X + Y * Y)))

Solution (Python):


import math

x1, y1, x2, y2 = map(float, input().split())
dis = math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))
print(dis)

Solution (Python):



import math

x1, y1, x2, y2 = [float(x) for x in input().split(' ')]
print('%.5f'%math.sqrt(pow(x2-x1, 2) + pow(y2-y1, 2)))

Solution (Python):
a,b,c,d=map(float,input().split())
print(abs(complex(c-a,d-b)))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
ans = ((x1 - x2)**2 + (y1 - y2)**2)**0.5
print("{0:.5f}".format(ans))

Solution (Python):
import math
a,b,c,d = map(float,input().split())
print(math.sqrt(((c-a)**2) + ((d-b)**2)))

Solution (Python):
import math
l=input().split()
x1=float(l[0])
y1=float(l[1])
x2=float(l[2])
y2=float(l[3])

A=math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
print(A)

Solution (Python):
import math

x1,x2,x3,x4 = map(float, input().split())
n = (x3 - x1)**2 + (x4 - x2)**2
ans = math.sqrt(n)
print(ans)

Solution (Python):
import math
  
def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a
     
def main():
    a = floatinput()
    x1 = a[0]; y1 = a[1]; x2 = a[2]; y2 = a[3]
    print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))
     
if __name__ == "__main__":
    main()

Solution (Python):
x1, y1, x2, y2 = map(float, raw_input().split())
print ((x1-x2)**2 + (y1-y2)**2)**0.5

Solution (Python):
from math import sqrt
x1,x2,y1,y2=map(float,input().split())
a=abs(x1-y1)**2
b=abs(x2-y2)**2
s=sqrt(a+b)
print(s)

Solution (Python):
import math

x1, y1, x2, y2 = map(float, input().split())
print(math.sqrt(abs(x2-x1)**2 + abs(y2-y1)**2))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print('{0:.4f}'.format(math.sqrt((x2-x1)**2 + (y2-y1)**2)))

Solution (Python):


import math

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a

def main():
    data = floatinput()
    x1 = data[0]; y1 = data[1]; x2 = data[2]; y2 = data[3]
    print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))

if __name__ == "__main__":
    main()

Solution (Python):
import math
a, b, c, d = map(float, input().split())
s1 = (a - c) * (a - c)
s2 = (b - d) * (b - d)
print("%.6f"%math.sqrt(s1+s2))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print("{0:.4f}".format(math.sqrt((x1 - x2)**2 + (y1 - y2)**2)))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print(f"{math.sqrt((x2-x1)**2+(y2-y1)**2):0.9f}")

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
x = math.fabs(x2 - x1)
y = math.fabs(y2 - y1)
d = math.sqrt(x**2 + y**2)
print('{:.8f}'.format(d))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print(((y2-y1)**2 + (x2-x1)**2)**(1/2))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print(((x1-x2)**2 + (y1-y2)**2)**(1/2))

Solution (Python):


points = [float(i) for i in input().rstrip().split()]
a = [points[0], points[1]]
b = [points[2], points[3]]

distanceSquare = (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
distance = distanceSquare ** 0.5

print(distance)

Solution (Python):
from math import sqrt
x1, y1, x2, y2 = map(float, input().split())
r = sqrt((x1 - x2)**2 + (y1 - y2)**2 )
print('{0:.5f}'.format(r))

Solution (Python):
from math import sqrt
x1, y1, x2, y2 = map(float, input().split())
r = sqrt((x1 - x2)**2 + (y1 - y2)**2 )
print(r)

Solution (Python):
import math

x1, y1, x2, y2 = map(float, input().split())
r = math.sqrt((x1 - x2) **2 + (y1 - y2) **2)
print(r)

Solution (Python):
import math
x1, y1, x2, y2 = map(float, raw_input().split())
print("%f" % (math.sqrt((x1-x2)**2+(y1-y2)**2) ,))

Solution (Python):
import sys

for line in sys.stdin:
    if len(line)>1:
        x1, y1, x2, y2 = line.strip('\n').split()
        x1, y1, x2, y2 = float(x1), float(y1), float(x2), float(y2)
        print ((x1-x2)**2+(y1-y2)**2)**0.5

Solution (Python):
x1, y1, x2, y2 = map(float, raw_input().split())
print ((x1-x2)**2 + (y1-y2)**2)**0.5

Solution (Python):
r=map(float,raw_input().split())
x=r[0]-r[2]
y=r[1]-r[3]
if x<0:
        x=x*-1
if y<0:
        y=y*-1
print (x**2+y**2)**0.5

Solution (Python):
from __future__ import division, print_function
from sys import stdin
from math import hypot, sqrt
x1, y1, x2, y2 = (float(s) for s in stdin.readline().split())
print('{:.4f}'.format(hypot(x1-x2, y1-y2)))

Solution (Python):
(n,m,o,p) = map(float, raw_input().split())
print ((n-o)**2 + (m-p)**2)**0.5

Solution (Python):
import math
x1, y1, x2, y2 = map(float, raw_input().split())
print math.sqrt((x1-x2)**2+(y1-y2)**2)

Solution (Python):
import math
x1,y1,x2,y2 = map(float,raw_input().split())
x = x2-x1
y = y2-y1
print math.sqrt(math.pow(x,2)+math.pow(y,2))

Solution (Python):
import math
x1,y1,x2,y2 = map(float,raw_input().split())
x = x2-x1
y = y2-y1
print math.sqrt(math.pow(x,2)+math.pow(y,2))

Solution (Python):
import math

x1, y1, x2, y2 = map(float, raw_input().split())
print math.sqrt((x2-x1)**2 + (y2-y1)**2)

Solution (Python):
import math
x,y,x2,y2 = map(float, raw_input().split())
print '%.7f' % math.sqrt((x-x2)**2 + (y-y2)**2)

Solution (Python):
from math import hypot

x1, y1, x2, y2 = map(float, input().strip().split())
print(hypot(x2 - x1, y2 - y1))

Solution (Python):
from math import sqrt 
a,b,c,d=map(float,input().split())
e=sqrt((c-a)**2+(d-b)**2)
print(e)

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print(abs(complex(x1-x2, y1-y2)))

Solution (Python):
import math
x1,y1,x2,y2 = [float(x) for x in input().split()]

print(math.sqrt((x1-x2)**2+(y1-y2)**2))

Solution (Python):
a,b,c,d=map(float,input().split())

import math

x=math.sqrt((c-a)**2+(d-b)**2)

print("{:.5f}".format(x))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
X = x1 - x2
Y = y1 - y2
print('{:.5f}'.format(math.sqrt(X * X + Y * Y)))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(((x1-x2)**2+(y1-y2)**2)**0.5)

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
a=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)
print(a**(1/2))

Solution (Python):
x1, y1, x2, y2 = map(float,input().split())
a=((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
print(a)

Solution (Python):
a,b,c,d=map(float,input().split())
r=((c-a)**2+(d-b)**2)**(1/2)
print(f'{r:5f}')

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())

l=math.sqrt((x2-x1)**2+(y2-y1)**2)

print('{:.8f}'.format(l))

Solution (Python):

a,b,c,d=map(float,input().split())

x=c-a
y=d-b

print((x**2+y**2)**(1/2))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx,dy=x2-x1,y2-y1
d=math.sqrt(dx*dx+dy*dy)
print("{:.8f}".format(d))

Solution (Python):
import math
x1,y1,x2,y2 = input().split( )
x = float(x1)-float(x2)
y = float(y1)-float(y2)
print(math.sqrt(x**2+y**2))

Solution (Python):
import math
x1,y1,x2,y2 = map(float,input().split())
a = math.sqrt((x2-x1)**2+(y2-y1)**2)
print('{:.8f}'.format(a))

Solution (Python):
import math
x1, y1, x2, y2 = map(float,input().split())
a = abs(x1-x2)
b = abs(y1-y2)

print(math.sqrt(a*a+b*b))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
print("{0:.8f}".format(math.sqrt((x1-x2)**2+(y1-y2)**2)))

Solution (Python):
a=list(map(float,input().split()))
print((abs(a[0]-a[2])**2+abs(a[1]-a[3])**2)**(1/2))

Solution (Python):
x1,y1,x2,y2 = map(float,input().split())
an = (x1 - x2)**2 + (y1 - y2)**2
dis = an/2
v = an/4
while abs(dis**2 - an) > 0.0001:
	if dis**2 > an:
		dis -= v
	else:
		dis += v
	v = v/2
print(dis)

Solution (Python):
values=input().split()
x1=float(values[0])
y1=float(values[1])
x2=float(values[2])
y2=float(values[3])
x_distance=x2-x1
y_distance=y2-y1
print(pow(pow(x_distance,2)+pow(y_distance,2),0.5))

Solution (Python):

x1,y1,x2,y2=map(float,input().split())
import math
A=math.sqrt((x2-x1)**2+(y2-y1)**2)

B=float('{:.8f}'.format(A))
print(B)

Solution (Python):
import math
a,b,c,d=map(float,input().split())
n=(a-c)**2+(b-d)**2
print(math.sqrt(n))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
import math;

x1,y1,x2,y2 = map(float,input().split());

x = (x2 - x1)**2;
y = (y2 - y1)**2;

c = math.sqrt(x + y);
print('{:.8f}'.format(c));

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
import math
s=math.sqrt((x1-x2)**2+(y1-y2)**2)
print(f'{s:.08f}')

Solution (Python):
import math

px, py, qx, qy = map(float,input().split())
pq = (qx - px) ** 2 + (qy - py) ** 2

print(math.sqrt(pq))

Solution (Python):
import math
a,b,c,d=(float(x) for x in input().split())

l=(math.sqrt((a-c)*(a-c)+(b-d)*(b-d)))

print('{:.08f}'.format(l))

Solution (Python):
import math

x1,y1,x2,y2 = map(float,input().split())

x =math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) 

print(f'{x:.08f}')

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
x3 = x2 - x1
y3 = y2 - y1
ans = math.hypot(x3, y3)
print(ans)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
A = [x1, y1]
B = [x2, y2]
dict = sum((a - b) ** 2 for a, b in zip(A, B))
print("{:.8f}".format(dict ** 0.5))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
ans = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** (1/2)
print(ans)

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
ans = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
print("%.10f" %(ans))

Solution (Python):
a,b,c,d = map(float,input().split())
x = a-c
y = b-d
from math import sqrt
res = sqrt(x**2+y**2)
print('{0:.6f}'.format(res))

Solution (Python):
x1, y1 , x2 , y2 = map(float, input().split())

D = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 / 2)
print(D)

Solution (Python):
x1, y1, x2, y2 = map(float,input().split())
print(f'{((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5:8f}')

Solution (Python):
import math
x1,y1,x2,y2 = map(float,input().split())
print("{0:.8f}".format(math.sqrt((x1-x2)**2+(y1-y2)**2)))

Solution (Python):
x1,y1,x2,y2 = map(float,input().split())
ans = ((x1-x2)**2 + (y1-y2)**2)**(1/2)
print(ans)

Solution (Python):
from enum import Enum
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

class Point():
    def __init__(self,arg_x,arg_y):
        self.x = arg_x
        self.y = arg_y

def calc_len(a,b):
    from math import sqrt
    return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))

x1,y1,x2,y2 = map(float,input().split())

p1 = Point(x1,y1)
p2 = Point(x2,y2)

print("%.10f"%calc_len(p1,p2))

Solution (Python):
from math import sqrt

x1,y1,x2,y2 = map(float,input().split())

print(sqrt(((x2-x1)**2)+(y2-y1)**2))

Solution (Python):
val=list(map(float,input().split()))
if(val[0]>val[2]):
    x=(val[0]-val[2])**2
else:
    x=(val[2]-val[0])**2
if(val[1]>val[3]):
    y=(val[1]-val[3])**2
else:
    y=(val[3]-val[1])**2
    
length=(x+y)**0.5
print(length)

Solution (Python):
A,B,C,D=map(float,input().split())
E=(C-A)**2

F=(D-B)**2

print((float)(E+F)**(1/2))

Solution (Python):
x1, y1, x2, y2  = map(float,input().split())
print(abs(complex( x2-x1,y2-y1)))

Solution (Python):
N = input().split()

z = ((float(N[0])-float(N[2]))**2)+((float(N[1])-float(N[3]))**2)
ans = z**0.5
print('{:.08f}'.format(ans))

Solution (Python):

import math
x1,y1,x2,y2=map(float,input().split())
a=abs(x2-x1)
b=abs(y2-y1)
c=math.sqrt(a**2+b**2)
print('{:.8f}'.format(c))

Solution (Python):
import math

x1,y1,x2,y2 = (float(x) for x in input().split())
print(round(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2), 8))

Solution (Python):



import math


def main():
    x1, y1, x2, y2 = map(float, input().split())
    ret = math.sqrt(pow(x1-x2, 2) + pow(y1-y2, 2))
    print(f"{ret: .8f}")


if __name__ == '__main__':
    main()

Solution (Python):
import math

x1, y1, x2, y2 = map(float, input().split())

dist = math.sqrt((x1-x2) ** 2 + (y1-y2) ** 2)
print("{:.5f}".format(dist))

Solution (Python):
import math

x1, y1, x2, y2 = map(float, input().split())

dist = math.sqrt((x1-x2) ** 2 + (y1-y2) ** 2)
print("{:.5f}".format(dist))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
print(abs(complex(x1-x2, y1-y2)))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print(math.sqrt((x2-x1)**2 + (y2-y1)**2))

Solution (Python):
import math

x1,y1,x2,y2 = (float(x) for x in input().split())
print(round(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2), 8))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(((x1-x2)**2+(y1-y2)**2)**0.5)

Solution (Python):
from math import sqrt
x1, y1, x2, y2 = map(float, input().split())
print(sqrt((x1-x2)**2 + (y1-y2)**2))

Solution (Python):
import math
x1, y1, x2, y2=map(float,input().split())

x=x1-x2
y=y1-y2

h=x**2+y**2

print(h**0.5)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
a=(x2-x1)**2+(y2-y1)**2
l=math.sqrt(a)
print(f'{l:.8f}')

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print(math.hypot(x2 - x1, y2 - y1))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(((x1-x2)**2+(y1-y2)**2)**0.5)

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
d=((x1-x2)**2+(y1-y2)**2)**(1/2)
print(d)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
x1,y1,x2,y2 = map(float,input().split())
dist = ((x1-x2)**2 + (y1-y2)**2)**0.5
print(dist)

Solution (Python):
from enum import Enum

class Point():
    def __init__(self, arg_x, arg_y):
        self.x = arg_x
        self.y = arg_y

def calc_len(a, b):
    from math import sqrt
    return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))

x1, y1, x2, y2 = map(float, input().split())

p1 = Point(x1, y1)
p2 = Point(x2, y2)

print("%.10f"%calc_len(p1, p2))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(f'{((x2-x1)**2+(y2-y1)**2)**0.5:.6f}')

Solution (Python):
import math
x1,y1,x2,y2 = ((float(x) for x in input().split()))

d = math.sqrt((x2-x1)**2+(y2-y1)**2)

print(d)

Solution (Python):
import math
L=list(map(float,input().split()))
A=(L[0]-L[2])*(L[0]-L[2])
B=(L[1]-L[3])*(L[1]-L[3])
V=math.sqrt(A+B)
print(round(V,8))

Solution (Python):
import math

x1, y1, x2, y2 = list(map(float, input().split()))
x = x2 - x1
y = y2 - y1
ans = math.sqrt(pow(x, 2) + pow(y, 2))

print(ans)

Solution (Python):
import math
x1,y1,x2,y2=(float(x) for x in input().split())
print('{:.05f}'.format(math.sqrt((x2-x1)**2+(y2-y1)**2)))

Solution (Python):
a,b,c,d = map(float,input().split())
print(abs(complex(c-a,d-b)))

Solution (Python):
import math
x1,y1,x2,y2 = map(float, input().split())
print(math.sqrt( (x1-x2)**2 + (y1-y2)**2 ) )

Solution (Python):
import math
a,b,c,d=map(float,input().split())
x=math.sqrt((a-c)**2 + (b-d)**2)
print(round(x,8))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())

n=(x1-x2)**2+(y1-y2)**2
n1=math.sqrt(n)

print(n1)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
P=math.sqrt((x2-x1)**2+(y2-y1)**2)
print(P)

Solution (Python):
import math
a,b,c,d=map(float,input().split())

x=abs(c-a)
y=x**2

z=abs(d-b)
w=z**2
t=math.sqrt(y+w)

print(f'{t:.8f}')

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
import math
print('{:.8f}'.format(math.sqrt(pow((x2-x1),2)+pow((y2-y1),2))))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())

z=((x1-x2)**2+(y1-y2)**2)**0.5
print("{0:.5f}".format(z))

Solution (Python):



x1, y1, x2, y2 = map(float, input().split())
ans = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
print(ans)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
x=x1-x2
y=y1-y2
ans=math.sqrt(x**2+y**2)
print(ans)

Solution (Python):
x, y, p, q = map(float, input().split())
ans = ((p-x)**2 + (q-y)**2)**0.5
print(f"{ans:.8f}")

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(((x1-x2)**2+(y1-y2)**2)**(1/2))

Solution (Python):
import math
a,aa,b,bb=map(float,input().split())
A=(math.sqrt(abs(a-b)**2+abs(aa-bb)**2))
print(A)

Solution (Python):
import math

x1, y1, x2, y2 = map(float, input().split())
line = (x2 - x1) ** 2 + (y2 - y1) ** 2
line = math.sqrt(line)
print(line)

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())

x = abs(x2 - x1)
y = abs(y2 - y1)

dis = (x ** 2 + y ** 2) ** (1 / 2)
dis = round(dis, 8)

print("{}" .format(dis))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))

Solution (Python):
import math
num=list(map(float,input().split(" ")))
x,y=math.fabs(num[0]-num[2]),math.fabs(num[1]-num[3])
ans=math.sqrt(x**2+y**2)
print(ans)

Solution (Python):
import math
x1,y1,x2,y2=map(float, input().split())
a = (x1-x2)**2
b = (y1-y2)**2
print(math.sqrt(a+b))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print(math.sqrt((x2-x1)**2 + (y2-y1)**2) )

Solution (Python):



x1, y1, x2, y2 = map(float,input().split())
x = (x2 - x1)
y = (y2 - y1)
s = (x*x + y*y)**(1/2)
print(s)

Solution (Python):

x1, y1, x2, y2= map(float, input().split())

apple = ((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))**0.5

print('{:.5f}'.format(apple))

Solution (Python):
import math
a,b,c,d=map(float,input().split())

x=abs(c-a)
y=x**2

z=abs(d-b)
w=z**2
t=math.sqrt(y+w)

print(f'{t:8f}')

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
A=abs(y1-y2)
B=abs(x1-x2)
C=math.sqrt(A**2+B**2)
print(f'{C:.8f}')

Solution (Python):
import math
a,b,c,d=map(float,input().split())

x=abs(c-a)
y=x**2

z=abs(d-b)
w=z**2
t=math.sqrt(y+w)

print(f'{t:.8f}')

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
print(f'{math.sqrt((x1-x2)**2+(y1-y2)**2):.5f}')

Solution (Python):
import math

x1,y1,x2,y2=map(float,input().split())
x=x2-x1
y=y2-y1
a=x*x+y*y
print("{:10f}".format(math.sqrt(a)))

Solution (Python):
import math
x1,y1,x2,y2 = map(float, input().split())
a1 = (x2-x1)**2
a2 = (x1-x2)**2
b1 = (y2-y1)**2
b2 = (y1-y2)**2
if x1<x2:
    if y1<y2:
        print(math.sqrt(a1+b1))
    else:
        print(math.sqrt(a1+b2))
else:
    if y1<y2:
        print(math.sqrt(a2+b1))
    else:
        print(math.sqrt(a2+b2))

Solution (Python):
import math

x1 , y1 , x2 , y2 = map(float,input().split())

a = abs(x1-x2)
b = abs(y1-y2)

ans = math.sqrt(a**2 + b**2)

print('{:.9f}'.format(ans))

Solution (Python):


x1, y1, x2, y2 = map(float, input().split())

a = abs(x1-x2)
b = abs(y1-y2)

import math
ans = math.sqrt(a**2 + b**2)

print('{:.9f}'.format(ans))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
print(f'{math.sqrt((x2-x1)**2+(y2-y1)**2):.5f}')

Solution (Python):
import math

x1,y1,x2,y2=map(float,input().split())

if x1>x2:
    H=x1-x2
else:
    H=x2-x1

if y1>y2:
    W=y1-y2
else:
    W=y2-y1
    
a=math.sqrt(H**2+W**2)

print(a)

Solution (Python):
a,b,c,d=map(float,input().split())
k=((c-a)*(c-a)+(d-b)*(d-b))**(1/2)
print('{:8f}'.format(k))

Solution (Python):
from math import sqrt
x1, y1, x2, y2 = map(float, input().split())
print(sqrt((x2 - x1)**2 + (y2 - y1)**2))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
if x1<=x2:
    x=x2-x1
else:
    x=x1-x2

if y1<=y2:
    y=y2-y1
else:
    y=y1-y2
    
t=x**2+y**2
t1=t**(1/2)
print(f'{t1:10.8f}')

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split(' '))

res=math.sqrt((x1-x2)**2+(y1-y2)**2)
print(res)

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
print(((x2-x1)**2+(y2-y1)**2)**0.5)

Solution (Python):
import math

x1, y1, x2, y2 = [float(line) for line in input().split()]
double_distance = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)

print(double_distance)

Solution (Python):
import math
x1,y1,x2,y2 = map(float, open(0).read().split())
ans = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
print("{:.8f}".format(ans))

Solution (Python):
import math

x1,y1,x2,y2=map(float,input().split())
dis2=(x1-x2)**2+(y1-y2)**2

dis = math.sqrt(dis2)
print('{:.8f}'.format(dis))

Solution (Python):
x_1,y_1,x_2,y_2=map(float,input().split())

import math
x=(x_2-x_1)**2
y=(y_2-y_1)**2

l=math.sqrt(x+y)
print('{:.16g}'.format(l))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
p=((x1-x2)**2+(y1-y2)**2)**0.5
print(f'{p:.8f}')

Solution (Python):
import math
from decimal import Decimal, ROUND_HALF_UP


def resolve():
    x1, y1, x2, y2 = map(float, input().split())
    a = Decimal(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)).quantize(Decimal('0.0001'), rounding=ROUND_HALF_UP)
    print(a)


resolve()

Solution (Python):
def dist(x1, y1, x2, y2):
    return ((x2 - x1)**2 + (y2 - y1)**2) ** 0.5

x1, y1, x2, y2 = map(float, input().split())
print(dist(x1, y1, x2, y2))

Solution (Python):
import math
x1,y1,x2,y2 = map(float,input().split())
ans = math.sqrt((x2-x1)**2+(y2-y1)**2) 
print(round(ans,8))

Solution (Python):
import math
x1, y1, x2, y2=map(float,input().split())
x=abs(x1-x2)
y=abs(y1-y2)
print('{:.5f}'.format(math.sqrt(x*x+y*y)))

Solution (Python):
x,y,p,q=map(float,input().split())
print(((x-p)**2+(y-q)**2)**(1/2))

Solution (Python):
x1, y1, x2, y2 = map(float, input().split())
ans = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
print(ans)

Solution (Python):

x1, y1, x2, y2 = map(float,input().split())
r = ((x1-x2)**2+(y1-y2)**2)**.5
print("{:.8f}".format(r))

Solution (Python):
import math
x1,y1,x2,y2 = map(float,input().split())
x = (x1-x2)**2
y = (y1-y2)**2
print('{:.8f}'.format(math.sqrt(x+y)))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
z = (x2-x1)**2 + (y2-y1)**2
kyori = math.sqrt(z)
print(kyori)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
import math
x1,y1,x2,y2 = map(float,input().split())
a = math.sqrt((x2-x1)**2+(y2-y1)**2)
print('{:.8f}'.format(a))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
x = abs(x1 - x2)
y = abs(y1 - y2)
xx = x ** 2
yy = y ** 2
zz = xx + yy
z = math.sqrt(zz)
print(round(z, 8))

Solution (Python):
import math

buf = input().split()

x1 = float(buf[0])
y1 = float(buf[1])
x2 = float(buf[2])
y2 = float(buf[3])

dis = math.sqrt((x2-x1)**2 + (y2-y1)**2)

print(dis)

Solution (Python):
import math
x1, y1, x2, y2 = list(map(float, input().split(' ')))
print("{0:.4f}".format(math.sqrt((x1 - x2)**2 + (y1 - y2)**2)))

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
a=abs(x2-x1)
b=abs(y2-y1)
c=math.sqrt(a**2+b**2)
print('{:.8f}'.format(c))

Solution (Python):
import math
x1, y1, x2, y2 = map(float, input().split())
print(math.sqrt((x2-x1)**2 + (y2-y1)**2))

Solution (Python):
import math
x_1, y_1, x_2, y_2 = map(float, input().split())
l = math.sqrt((x_1 - x_2)**2 + (y_1 - y_2)**2)
print(l)

Solution (Python):
import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))

Solution (Python):
import math
x1,y1,x2,y2 = map(float,input().split())
a = abs(x1-x2)
b = abs(y1-y2)
d = math.sqrt(a ** 2 + b ** 2)
print(d)

Solution (Python):


from decimal import Decimal
import math

def main():
    x1,y1,x2,y2 = map(Decimal,input().split())
    print("{:.8f}".format(math.sqrt((x2-x1)**2+(y2-y1)**2)))

if __name__=="__main__":
    main()

Solution (Python):

import math
x1,y1,x2,y2=map(float,input().split())
a=abs(x2-x1)
b=abs(y2-y1)
c=math.sqrt(a**2+b**2)
print('{:.8f}'.format(c))

Solution (Python):
x1,y1,x2,y2=map(float,input().split())
a=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)
print(a**(1/2))