#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
{
double x0, y0, x1, y1;
cin>>x0>>y0>>x1>>y1;
cout.precision(2);
cout<<fixed<<sqrt(pow(abs(x1-x0),2)+pow(abs(y1-y0),2))<<endl;
}
return 0;
}