#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=1e5+1e4,M=1e3+1e2;
const ll Maxn=0x3ffffff,Minm=-0x3ffffff;
ll t;
ll x,y,x2,y2;
signed main()
{
cin>>t;
while(t--)
{
cin>>x>>y;
cin>>x2>>y2;
printf("%.2f\n",sqrt(abs(x-x2)*abs(x-x2)+abs(y-y2)*abs(y-y2)));
}
}