magicmelonG @ 2023-01-25 09:37:00
import java.util.Scanner;
class point {
private double x,y;
public point(double x,double y) {
this.x=x;
this.y=y;
}
public double getx() {
return x;
}
public double gety() {
return y;
}
}
public class Main {
public static void main(String []args) {
point[] ppp= new point[4];
for(int i=0;i<3;i++) {
Scanner sc=new Scanner(System.in);
int x1=sc.nextInt();
int x2=sc.nextInt();
ppp[i]=new point(x1,x2);
//System.out.print(ppp[i].getx());
//System.out.print(ppp[1].gety());
}
double distance,d1,d2,d3;
d1=Math.sqrt((ppp[0].getx()-ppp[2].getx())*(ppp[0].getx()-ppp[2].getx())+(ppp[0].gety()-ppp[2].gety())*(ppp[0].gety()-ppp[2].gety()));
d2=Math.sqrt((ppp[1].getx()-ppp[0].getx())*(ppp[1].getx()-ppp[0].getx())+(ppp[1].gety()-ppp[0].gety())*(ppp[1].gety()-ppp[0].gety()));
d3=Math.sqrt((ppp[1].getx()-ppp[2].getx())*(ppp[1].getx()-ppp[2].getx())+(ppp[1].gety()-ppp[2].gety())*(ppp[1].gety()-ppp[2].gety()));
distance=d1+d2+d3;
System.out.print(String.format("%.2f", distance));
}
}