Welcome to ZOJ
Information
Select Problem
Runs
Ranklist
ZOJ Problem Set - 2503
What is the Length?

Time Limit: 2 Seconds      Memory Limit: 65536 KB

Maybe you have ever heard that there is a small country named Schulland. Schulland is very interesting because it looks like a regular n-polygon. At each vertex there is a small house in which there lives a small and fat dwarf.

Once upon a time the King of Dwarfs decided to hold a small party at the same center of that n-polygon. Your task is just to determine how many units of time it takes a fat dwarf to reach the destination from his house. Unfortunately those dwarfs don't use the shortest path. All the time each of them goes in the direction of the dwarf that lives in the next house (counter-clockwise).

For Example


If we have 4-gon (a square)

Every dwarf has to go a way like this:

TASK

Your task is to calculate the length of that path.

INPUT

In the first line there is an integer C (0<=C<=10 000), indicating the number of test cases.

In the next C lines there is an integer N (1<N<1 000 000 000), which means the number of vertices of the given N-polygon.

OUTPUT

For each case, you should output your answer in a single line, rounded up to 3 digits after the decimal point.

SAMPLE

INPUT

2
3
4

OUTPUT

0.667
1.000

----------------------

Problemsetter: Mirek "Miras" Michalski (mirosuaf@gmail.com)


Source: 3MG_Contest
Submit    Status