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 as m

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

X = x2-x1
Y = y2-y1

X = m.pow(X, 2)
Y = m.pow(Y, 2)

distance = m.sqrt((X+Y))

print(f'{distance}', end='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,c,d=list(map(float,input().split()))
print('{number:.5f}'.format(number=math.sqrt((a-c)*(a-c)+(b-d)*(b-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:
from sys import stdin
x1, y1, x2, y2 = map(float, stdin.readline().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())
xx = (x2 - x1) ** 2
yy = (y2 - y1) ** 2
print(f"{math.sqrt(xx + yy):.8f}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

ac = a - c

bd = b - d

print(math.sqrt(ac ** 2 + bd ** 2))

Submission status: Accepted

Solution code:
import math

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

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

 print(d)

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#
import math

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

print(math.sqrt((dx**2+dy**2)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m

x_1,y_1,x_2,y_2=map(float,input().split())
w=abs(x_2-x_1)
h=abs(y_2-y_1)

root=m.sqrt(w**2+h**2)
print('{:.8f}'.format(root))

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())
dis = math.sqrt((x2-x1)**2 + (y2-y1)**2)
print(dis)

Submission status: Accepted

Solution code:
import math
int_line = input().split(" ")
int_list = [float(a) for a in int_line]
num1 = int_list[2] - int_list[0]
num2 = int_list[3] - int_list[1]
if num1 < 0:
    num1 *= -1
if num2 < 0:
    num2 *= -1
num3 = num1 ** 2 + num2 ** 2
num4 = math.sqrt(num3)
print(round(num4,5))

Submission status: Accepted

Solution code:
import math

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

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())
print(math.sqrt((x1-x2)**2+(y1-y2)**2))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(f"{math.sqrt(x + y):.5f}")

Submission status: Accepted

Solution code:
import math

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

x3 = (x2-x1) ** 2
y3 = (y2-y1) ** 2

print(math.sqrt(x3 + y3))

Submission status: Accepted

Solution code:

import math

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

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())
dist = math.sqrt((x2 - x1)**2 + (y2- y1)**2)
print('{:.8f}'.format(dist))

Submission status: Accepted

Solution code:
import math
x_1, y_1, x_2, y_2 = map(float,input().split())
x = x_2 - x_1
y = y_2 - y_1
print(math.sqrt(x * x + y * y))

Submission status: Accepted

Solution code:
import math

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

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

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())
a = x2 - x1
b = y2 - y1
ans = math.sqrt(a**2 + b**2)
print(ans)

Submission status: Accepted

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

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

print(distance**0.5)

Submission status: Accepted

Solution code:
import math
term = input().split()
P1x = float(term[0])
P1y = float(term[1])
P2x = float(term[2])
P2y = float(term[3])

print('{}'.format(math.sqrt((P2x - P1x)**2 + (P2y - P1y)**2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(float, input().split())
w, h = abs(x1 - x2), abs(y1 - y2)
print(h if w == 0 else w if h == 0 else (w ** 2 + h ** 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())
print (math.sqrt(((y2-y1)**2)+((x2-x1)**2)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


if __name__ == "__main__":
    coords = list(map(float, input().split()))

    x1 = coords[0]
    y1 = coords[1]
    x2 = coords[2]
    y2 = coords[3]

    distance = math.hypot(abs(x1 - x2), abs(y1 - y2))

    print(distance)

Submission status: Accepted

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

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:
import math

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

Submission status: Accepted

Solution code:
import math

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

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())

w = (x1-x2)**2
h = (y1-y2)**2

print(math.sqrt(w+h))

Submission status: Accepted

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

print(distance(a,b,c,d))

Submission status: Accepted

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

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 = list(map(float, input().split()))

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

print(dist)

Submission status: Accepted

Solution code:
import math
x_1,y_1,x_2,y_2 = map(float,input().split())
print(math.sqrt((x_1-x_2)**2 + (y_1-y_2)**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:
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 sys
import math
x1,y1,x2,y2=map(float,input().split())
x=pow(abs(x2-x1),2)
y=pow(abs(y2-y1),2)
l=math.sqrt(x+y)
print(str(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=map(float,input().split())
l=((a-c)**2+(b-d)**2)**(1/2)
l=round(l,6)
print(l)

Submission status: Accepted

Solution code:
import math

def distance(a, b, c, d):
    return math.sqrt((c-a)**2 + (d-b)**2)


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

Submission status: Accepted

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

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

print((dx ** 2 + dy ** 2) ** 0.5)

Submission status: Accepted

Solution code:
import math


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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
input = sys.stdin.readline().rstrip

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Problem - 距離

import math

# input
x_1, y_1, x_2, y_2 = map(float, input().split())

# calc
ans = math.sqrt((x_2-x_1)**2 + (y_2-y_1)**2)

# output
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())

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

print(d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(float, input().split())
x = abs(x1 - x2)
y = abs(y1 - y2)
d = (x**2+y**2)**0.5
print('{:.6f}'.format(d))

Submission status: Accepted

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

a = (x1 - x2)**2
b = (y1 - y2)**2

print(math.sqrt(a+b))

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:
x,y,x_,y_=map(float,input().split())
X=abs(x-x_)**2
Y=abs(y-y_)**2
print("{:.4f}".format((X+Y)**(1/2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if x2 > x1:
    x = x2 - x1
    
else:
    x = x1 - x2
    
if y2 > y1:
    y = y2 - y1

else:
    y = y1 - y2
    
ans = math.sqrt(x ** 2 + y ** 2)

print(f"{ans:.4f}")

Submission status: Accepted

Solution code:
import math
s = input().rstrip().split(' ')
x0 = float(s[0])
y0 = float(s[1])
x1 = float(s[2])
y1 = float(s[3])
dis = math.sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2)
print(dis)

Submission status: Accepted

Solution code:
import math

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

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:
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(distance)

Submission status: Accepted

Solution code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

from math import sqrt

a,b,c,d = map(float,input().split())
print (sqrt((a-c)**2.0+(b-d)**2.0))

Submission status: Accepted

Solution code:
[x1,y1,x2,y2]=[float(item) for item 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())

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
a = (x2-x1)**2 + (y2-y1)**2
print(math.sqrt(a))

Submission status: Accepted

Solution code:
import math

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

e=((c-a)**2+(d-b)**2)

print(math.sqrt(e))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,c,d=map(float,input().split())
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("{:.8f}".format(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(format( ((x2-x1) ** 2 + (y2-y1) ** 2) ** 0.5,".5f"))

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())
print("{:.8f}". format(((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

sc = list(map(float, input().split()))
x1 = sc[0]
y1 = sc[1]
x2 = sc[2]
y2 = sc[3]

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

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:
a = list(map(float, input().split()))
print((abs(a[0]-a[2])**2 + abs(a[1]-a[3])**2) ** (1/2))

Submission status: Accepted

Solution code:
import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, m, l, p = map(float, readline().split())

print(((l-n)**2+(p-m)**2)**.5)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import sqrt

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

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

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2 = map(float,input().split())
print("{0:.8f}".format(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((x1 - x2) ** 2 + (y1 - y2) ** 2)

print(distance)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math

#n= int(input())
#tmp= float(input())

tmp = input().split()
x1,y1,x2,y2 = list(map(lambda a: float(a), tmp))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = list(map(float,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

d = math.sqrt((x_2 - x_1)**2 + (y_2 - y_1) ** 2)
print(d)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(float, input().split())
print("{:.8f}".format(((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
a,b,c,d = map(float, input().split())

print("{0:.8f}".format(math.sqrt(abs(a-c)**2 + abs(b-d)**2)))

Submission status: Accepted

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

Submission status: Accepted

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

import math
print('%.5f'%(math.sqrt((x2-x1)**2 + (y2-y1)**2)))

Submission status: Accepted

Solution code:
def distance(A):
    return ((A[0]-A[2])**2+(A[1]-A[3])**2)**0.5

A=list(map(float,input().split()))
print(distance(A))

Submission status: Accepted

Solution code:
import math

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

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

answer = math.sqrt(x ** 2 + y ** 2)

print("{:.8f}".format(answer))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import math

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

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

ans = math.sqrt(ans)

print(ans)

Submission status: Accepted

Solution code:
#初期値の入力
import math
input_data = list(map(float, input().split()))

#辺の計算と表示
result = math.sqrt((input_data[2]-input_data[0])**2+(input_data[3]-input_data[1])**2)
print(f"{result:.8f}")

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(float, input().split())
print(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** (1 / 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:
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())
print('{:.8f}'.format(math.sqrt((x2-x1)**2+(y2-y1)**2)))

Submission status: Accepted

Solution code:
import math

a,b,c,d = list(map(float,input().split()))
x = c - a
y = d - b
print(math.sqrt(x ** 2 + y ** 2))

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())
a = x2 - x1
b = y2 - y1
c = math.sqrt(a * a + b * b)
print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a,b,c,d=map(float,input().split())
print("{:.10f}".format(math.sqrt((a-c)**2 + (b-d)**2)))

Submission status: Accepted

Solution code:
import math

# インプットデータを受け取る
x1, y1, x2, y2 = map(float, input().split())

# 2点間の距離を求める
sub1 = abs(x1 - x2)
sub2 = abs(y1 - y2)
dstncsqr = sub1 ** 2 + sub2 ** 2
print(math.sqrt(dstncsqr))

Submission status: Accepted

Solution code:
import math

if __name__ == "__main__":

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

    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())
if x1 > x2:
    if y1 > y2:
        print(math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))
    else:
        print(math.sqrt((x1 - x2) ** 2 + (y2 - y1) ** 2))
else:
    if y1 > y2:
        print(math.sqrt((x2 - x1) ** 2 + (y1 - y2) ** 2))
    else:
        print(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def calc_dist(x, y):
    if x > 0 and y > 0:
        result = abs(x) - abs(y)
    elif x < 0 and y > 0:
        result = abs(x) + abs(y)
    elif x > 0 and y < 0:
        result = abs(x) + abs(y)
    elif x < 0 and y < 0:
        result = abs(x) - abs(y)
    elif x == 0 or y == 0:
        result = abs(x) + abs(y)
    return abs(result)

x1, y1, x2, y2 = map(float, input().split())
dist1 = calc_dist(x1, x2)
dist2 = calc_dist(y1, y2)
dist3 = math.sqrt(dist1**2 + dist2**2)
print('{:.8f}'.format(dist3))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

x, y, xx, yy = map(float,input().split())
dx = abs(x - xx)
dy = abs(y - yy)

result = math.sqrt(dx**2 + dy**2)
print(result)

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2 = map(float,input().split())
d = math.sqrt(math.pow(x2 - x1,2) + math.pow(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' % d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(distance)

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 = [ float(s) for s in 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(pow(x2-x1,2) + pow(y2-y1,2)))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

p = list(map(float, input().split()))

res = math.sqrt((p[0] - p[2])**2 + (p[1] - p[3])**2)

print(res)

Submission status: Accepted

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

import math

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

Submission status: Accepted

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

def dist(a1,b1,a2,b2):
    d = ( (a2 - a1)**2 + (b2 - b1)**2 )**0.5
    return d
    
a = dist(x1,y1,x2,y2)
print("{:.10f}".format(a))

Submission status: Accepted

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

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

print(d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

x1,y1,x2,y2 = [ float( val ) for val in input().split( ' ' ) ]
distance = math.sqrt( pow(abs(x1-x2),2)+pow(abs(y1-y2),2) )
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())
def dist(a,b):
    return (a-b)**2
print((dist(y2,y1)+dist(x2,x1))**0.5)

Submission status: Accepted

Solution code:
import math
x1,y1,x2,y2=[float(k) for k in input().split()]
print(math.hypot(math.fabs(x1-x2),math.fabs(y1-y2)))

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2 = [float(i) for i in input().split()]
v = math.pow(x1 - x2, 2) + math.pow(y1 - y2, 2)
v = math.sqrt(v)
print(v)

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('{:.8f}'.format(d))

Submission status: Accepted

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