//Problem link>>http://uva.onlinejudge.org/external/127/12704.html
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int t , i , a ,b ;
cin>>t ;
for (i=1 ; i<=t ; i++)
{
double x ,r ;
cin>>a>>b>>r ;
x=sqrt(a*a+b*b) ;
printf ("%.2lf %.2lf\n",r-x , r+x) ;
}
return 0 ;
}
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int t , i , a ,b ;
cin>>t ;
for (i=1 ; i<=t ; i++)
{
double x ,r ;
cin>>a>>b>>r ;
x=sqrt(a*a+b*b) ;
printf ("%.2lf %.2lf\n",r-x , r+x) ;
}
return 0 ;
}
No comments:
Post a Comment