Homework 5 Problem 1

Homework 5 Problem 1

You cannot submit for this problem because the homework's deadline is due.

Description

Detailed description please check the hwk5.pdf file on CANVAS.
In this question, you will be given an integer n, then followed by n lines. Each line includes the coordinate for 1 or 2 points. If there's 1 point, output its distance to the origin. If there's 2 points, output their relative distance.

Format

Name your file as ex1.c

Input

An integer n followed by n lines.

Output

n lines, each line a number shows the distance. Display three digits after the decimal point.

Sample 1

Input

2
1 1 2 2
1 2

Output

1.434
2.236

Homework 5

Not Claimed
Status
Finished
Problems
5
Open Since
2020-07-12 00:00
DDL
2020-07-20 23:59
Extension
48.0 hour(s)