#include <stdio.h>
#include <math.h>
int main()
{ int n;
double x1,y1,x2,y2,dx,dy,dt;
scanf("%d",&n);
while(n--)
{ scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
dx=x1-x2;
dy=y1-y2;
dt=sqrt(dx*dx+dy*dy);
printf("%.2f\n",dt); }
return 0;
}