#include <stdio.h>
#include <math.h>

int main() {
    int n;
    double x1, y1, x2, y2;
    if(scanf("%d", &n) != 1)
       printf("Invalid input\n");
       return 0;
}
    while (n--) {
        if(scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2) != 4) {
           printf("Invalid input\n");
           return 0;
        }
    printf("%.2f\n", hypot(x2 - x1, y2 - y1));
    }
    return 0;
}