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