Sunday, June 26, 2016

UVA 12704 Solution

Unknown
#include<cstdio>
#include<math.h>
using namespace std;

int main()
{
    int tc;
    scanf("%d",&tc);
    while (tc--)
    {
        double x,y,r,dis;
        scanf("%lf%lf%lf",&x,&y,&r);
        dis=sqrt(x*x+y*y);
        printf("%.2lf %.2lf\n",r-dis,r+dis);
    }
    return 0;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

0 comments:

Post a Comment

Coprights @ 2016,