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



Sample input:
0 0 1 1


Sample output:
1.41421356

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import sqrt

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

# calculation
dist = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)

# output
print('{:.8f}'.format(dist))

Submission status: Accepted

Solution code:
import math

x1,y1,x2,y2 = map(float,input().split())
x = x1-x2
y = y1-y2
n = pow(x,2) + pow(y,2)

print(math.sqrt(n))

Submission status: Accepted

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

xdistance = x1 - x2
ydistance = y1 - y2

print(((xdistance**2) + (ydistance**2)) ** 0.5)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [float(i) for i in input().split()]
print(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5)

Submission status: Accepted

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

Submission status: Accepted

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

print(format(math.sqrt((x1-x2)**2+(y1-y2)**2), '.8f'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
#coding: utf-8

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

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2=map(float,input().split())
distance = math.sqrt( pow(x1-x2, 2.0) + pow(y1-y2, 2.0) )
print(f"{distance:.5f}")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x_1,y_1,x_2,y_2 = map(float,input().split())
d_2 =(x_2 - x_1)**2 + (y_2 - y_1)**2
d = d_2**0.5
print(d)

Submission status: Accepted

Solution code:
import math
s = input().split()

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

delta_x = x1-x2
delta_y = y1-y2

distance = math.sqrt(delta_x*delta_x+delta_y*delta_y)
print(distance)

Submission status: Accepted

Solution code:
def test():

	points = input().split()

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

	output = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5

	print(f"{output:.8f}")

if __name__ == "__main__":
	test()

Submission status: Accepted

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

ans = ((x2-x1)**2 + (y2-y1)**2) ** 0.5
print(round(ans,6))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [float(_) for _ in input().split()]

ans = ((x2-x1)**2 + (y2-y1)**2)**0.5
print(ans)

Submission status: Accepted

Solution code:
import math

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

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

print(dis)

Submission status: Accepted

Solution code:
import math
a,b,x,y=map(float,input().split())
f=x-a
d=((x-a)*(x-a)+(y-b)*(y-b))**(1/2)
print('%5f'%(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

input_nums = input().split()
distance = math.sqrt( (float(input_nums[2]) - float(input_nums[0]))**2 + (float(input_nums[3])-float(input_nums[1]))**2 )
print(distance)

Submission status: Accepted

Solution code:
import math

x1,y1,x2,y2 = map(float,input().split())
w = abs(x2 - x1)
h = abs(y2 - y1)

s = math.sqrt(w**2 + h**2)

print(s)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math as mt
x1, y1, x2, y2 = map(float, input().split())
xd = abs(x1 - x2)
yd = abs(y1 - y2)
d = mt.sqrt(xd*xd + yd*yd)
print(d)

Submission status: Accepted

Solution code:
w, x, y, z = map(float, input().split())
print('%5f' % ((w - y)**2 + (x - z)**2)**0.5)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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


print(math.sqrt(s))

Submission status: Accepted

Solution code:
import math as mp
l = list(map(float,input().split()))
print(mp.sqrt((l[0]-l[2])**2+(l[1]-l[3])**2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(d)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


if __name__ == "__main__":
    x1, y1, x2, y2 = map(lambda x: float(x), input().split())
    print("{:.5f}".format(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)))

Submission status: Accepted

Solution code:
a = list(map(float,input().split()))

x = abs(a[0]-a[2])
y = abs(a[1]-a[3])

L = (x**2 + y**2)**(1/2)

print(L)

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys
import math

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

#abc list
#abc = [chr(ord('a') + i) for i in range(26)]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

def get_input():
    N = []
    while True:
        try:
            N.append(input())
        except EOFError:
            break
    return N

def main():
    X1, Y1, X2, Y2 = [float(x) for x in input().split()]
    
    dx = (X1 - X2)**2
    dy = (Y1 - Y2)**2

    print(math.sqrt(dx+dy))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math


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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
a, b, x, y = map(float, input().split())
print(((a - x) ** 2 + (b - y) ** 2) ** 0.5)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = x1-x2
y = y1-y2

print(math.sqrt(x**2+y**2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

L=input().split( )
x1=float(L[0])
x2=float(L[2])
y1=float(L[1])
y2=float(L[3])
r2=(x1-x2)**2+(y1-y2)**2
r=math.sqrt(r2)
print(r)

Submission status: Accepted

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

dis =((c-a)**2 + (d-b)**2)**0.5
print(format(dis,'.8f'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from numpy import*
#from scipy import*
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby
from operator import mul
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
#input=sys.stdin.readline  #危険！基本オフにしろ！
sys.setrecursionlimit(10**6)

def f(i):
    xa,ya,xb,yb=i
    return ((xa-xb)**2+(ya-yb)**2)**0.5



def main():
    print(f(list(map(float,input().split()))))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import decimal
import math


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


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

Submission status: Accepted

Solution code:

a = input()
num = a.split(" ")

sq = ( float(num[0])-float(num[2]) )*( float(num[0])-float(num[2]) ) + ( float(num[1])-float(num[3]) )*( float(num[1])-float(num[3]) )
print (round(sq**0.5,8))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

class Point():
    def __init__(self, __x, __y):
        self.__x = __x
        self.__y = __y
    
    def get_x(self):
        return self.__x
    
    def get_y(self):
        return self.__y

def dist(__p1, __p2):
    __dist_x = abs(__p2.get_x() - __p1.get_x())
    __dist_y = abs(__p2.get_y() - __p1.get_y())
    return math.sqrt(__dist_x ** 2 + __dist_y ** 2)

str = input().split()
x1, y1, x2, y2 = [float(i) for i in str]
p1 = Point(x1, y1)
p2 = Point(x2, y2)
print(dist(p1, p2))

Submission status: Accepted

Solution code:
import math

inputdata = input().split()
datax1 = float(inputdata[0])
datax2 = float(inputdata[2])
datay1 = float(inputdata[1])
datay2 = float(inputdata[3])

print( math.sqrt( math.pow(datax2-datax1,2) + math.pow(datay2 - datay1,2)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(float(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(float,input().split())
x=float(x1-x2)
y=float(y1-y2)
import math
l=math.hypot(x,y)
print("{:.8f}".format(l))

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2  = map(float, input().split())
x=float(x2-x1)
y=float(y2-y1)
r=math.hypot(x,y)
print("{:.8f}".format(r))

Submission status: Accepted

Solution code:
import math
x1,y1,x2,y2=map(float,input().split())
x=x2-x1
y=y2-y1
r=math.hypot(x,y)
print("{:.8f}".format(r))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def get_distance(x1, y1, x2, y2):
    d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
    return d

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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



print(math.hypot(x1 - x2 , y1 - y2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

def d(u, v):
    return math.sqrt((u.x - v.x) ** 2 + (u.y - v.y) ** 2)


a = [float(e) for e in input().split()]
u = Point(a[0], a[1])
v = Point(a[2], a[3])
print(d(u, v))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	x1,y1,x2,y2 = map(float,input().split())
	
	distance = (abs(x2 - x1)**2 + abs(y2 - y1)**2)**0.5
	print(distance)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = input().split(" ")
x1 = float(x1)
x2 = float(x2)
y1 = float(y1)
y2 = float(y2)

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x1,y1,x2,y2 = map(float,input().split())
print(f'{math.hypot(x2-x1,y2-y1):.5f}')

Submission status: Accepted

Solution code:
a,b,c,d=map(float,input().split())
print('{:.5f}'.format((abs(a-c)**2+abs(b-d)**2)**0.5))

Submission status: Accepted

Solution code:
x = input()
list = x.split()
list_i = [float(s) for s in list]

p1x = list_i[0]
p1y = list_i[1]
p2x = list_i[2]
p2y = list_i[3]

kyori1 = p2x - p1x
kyori2 = p2y - p1y
kyori3 = kyori1 ** 2 + kyori2 ** 2


ans = kyori3 ** 0.5
ans = float(ans)

print(ans)

Submission status: Accepted

Solution code:
import math
# 基本データのインプット
x1, y1, x2, y2 = [float(i) for i in input().split()]
# print(x1)
# print(y2)

# 直角三角形の斜辺を求める計算式 X の差分の2乗　＋　y の差分の　2乗　を　平方根にする
temp = ((x2 - x1) ** 2) + ((y2 - y1) ** 2)
shahen = math.sqrt(temp)

print(shahen)

Submission status: Accepted

Solution code:
import math

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

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

print("%.8f"%distance)

Submission status: Accepted

Solution code:
import math
nums = list(map(float, input().split()))
print(math.sqrt(((nums[0]-nums[2])**2 + (nums[1]-nums[3])**2)))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

distance = ((x1-x2)**2 + (y1-y2)**2)**0.5

print(distance)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

print('{0:5f}'.format(((x2-x1)**2 + (y2-y1)**2)**(1/2)))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(map(float, input().split()))
x = pow((x2-x1), 2)
y = pow((y2-y1), 2)
r = pow((x+y), 1/2)
print(r)

Submission status: Accepted

Solution code:
import math

X1,Y1,X2,Y2=map(float,input().split())
print(math.sqrt((X2-X1)*(X2-X1)+(Y2-Y1)*(Y2-Y1)))

Submission status: Accepted

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

Submission status: Accepted

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

a = x1-y1
b = x2-y2
d = a*a + b*b
dist = pow(d, 1/2)
print(dist)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inData = list(map(float,input().split()))
p11 = inData[0]
p12 = inData[1]
p21 = inData[2]
p22 = inData[3]

distance = pow(pow(p21-p11,2) + pow(p22-p12,2),1/2)
print(distance)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2 = map(float, input().split())
def get_distance(x1, y1, x2, y2):
    d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
    return d
c = get_distance(x1, y1, x2, y2)
print(c)

Submission status: Accepted

Solution code:
from math import sqrt


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

rs = sqrt(abs(x1 - x2)**2 + abs(y1 - y2)**2)
print(round(rs, 8))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ax1, ay1, bx1, by1 = map(float, input().split())
print(((bx1 - ax1) ** 2 + (by1 - ay1) ** 2) ** 0.5)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(float, input().split())
z = x1 - x2 + (y1 - y2) * 1j
print(abs(z))

Submission status: Accepted

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

x = x1 - x2
y = y1 - y2

print("%.5f" % ((x ** 2 + y ** 2) ** 0.5))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = [float(i) for i in input().split()]
print("{:.8f}".format(((x1-x2)**2+(y1-y2)**2)**0.5))

Submission status: Accepted

Solution code:
s = input().split()
x1 = float(s[0])
y1 = float(s[1])
x2 = float(s[2])
y2 = float(s[3])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# coding: Shift_JIS
# coding: EUC-JP
# coding: cp932
import math

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

Submission status: Accepted

Solution code:
import sys
import math

x1, y1, x2, y2 = map(float, sys.stdin.read().strip().split())
print('{0:.8f}'.format(math.hypot(x2 - x1, y2 - y1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def main():
    x1, y1, x2, y2 = (float(a) for a in input().split())
    print(math.sqrt((max(x1, x2) - min(x1,x2))**2 + ((max(y1,y2)-min(y1,y2))**2)))

main()

Submission status: Accepted

Solution code:
import math
a=list(map(float,input().split()))

d=math.sqrt(pow(a[0]-a[2],2)+pow(a[1]-a[3],2))

print(d)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
def calculateKyori(x1, y1, x2, y2):
    return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)

if __name__ == '__main__':
    x1, y1, x2, y2 = map(float, input().split())
    n = calculateKyori(x1, y1, x2, y2)
    print('{0:.8f}'.format(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(d)

Submission status: Accepted

Solution code:
from math import sqrt

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

Submission status: Accepted

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

Submission status: Accepted

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

X=(x1-x2)*(x1-x2)
Y=(y1-y2)*(y1-y2)

print("%.10f"%(sqrt(X+Y)))

Submission status: Accepted

Solution code:
import math
order=list(map(float,input().split()))
print(math.sqrt((order[0]-order[2])**2 + (order[1]-order[3])**2))

Submission status: Accepted

Solution code:
import math
m=list(map(float,input().split()))
a=m[0]
b=m[1]
c=m[2]
d=m[3]
ans=math.sqrt((c-a)**2+(d-b)**2)
print(round(ans,8))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

x1,y1,x2,y2=map(float,input().split())
L=math.sqrt(pow(x1-x2,2)+pow(y1-y2,2))
print(str(L))

Submission status: Accepted

Solution code:
import math

x1, y1, x2, y2 = [float(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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