The statement of this problem is the same as the statement of problem C2. The only difference is that, in problem C1, $n$ is always even, and in C2, $n$ is always odd.

You are given a regular polygon with $2 \cdot n$ vertices (it's convex and has equal sides and equal angles) and all its sides have length $1$. Let's name it as $2n$-gon.

Your task is to find the square of the minimum size such that you can embed $2n$-gon in the square. Embedding $2n$-gon in the square means that you need to place $2n$-gon in the square in such way that each point which lies inside or on a border of $2n$-gon should also lie inside or on a border of the square.

You can rotate $2n$-gon and/or the square.


-----Input-----

The first line contains a single integer $T$ ($1 \le T \le 200$) — the number of test cases.

Next $T$ lines contain descriptions of test cases — one per line. Each line contains single even integer $n$ ($2 \le n \le 200$). Don't forget you need to embed $2n$-gon, not an $n$-gon.


-----Output-----

Print $T$ real numbers — one per test case. For each test case, print the minimum length of a side of the square $2n$-gon can be embedded in. Your answer will be considered correct if its absolute or relative error doesn't exceed $10^{-6}$.


-----Example-----
Input
3
2
4
200

Output
1.000000000
2.414213562
127.321336469

Difficulty: interview

Starter code:

Solutions:
import math

T = int(input())
for _ in range(T):
    n = int(input())
    print(1/math.tan(math.pi/2/n))


t=int(input())
import math as m
while t:
    t-=1
    a=int(input())
    print(1/(m.tan(m.pi/(2*a))))


import sys
import math

readline = sys.stdin.readline
read = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    n = ni()
    print(1 / math.tan(math.pi / (2 * n)))
    return


# solve()

T = ni()
for _ in range(T):
    solve()


#                                               |
#   _` |  __ \    _` |   __|   _ \   __ \    _` |   _` |
#  (   |  |   |  (   |  (     (   |  |   |  (   |  (   |
# \__,_| _|  _| \__,_| \___| \___/  _|  _| \__,_| \__,_|

import sys
import math
import operator as op
from functools import reduce

def read_line():
	return sys.stdin.readline()[:-1]
 
def read_int():
	return int(sys.stdin.readline())
	
def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def read_float_line():
	return [float(v) for v in sys.stdin.readline().split()]

def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer / denom

def rad(x):
	return math.pi*x/180

t = read_int()
for i in range(t):
	n = read_int()
	ans = 1/(math.tan(rad(180/(2*n))))
	print(ans)

import math

def sqare_size(n):
    return 1/math.tan(math.pi/(2*n))

t = int(input())
for _ in range(t):
    print(sqare_size(int(input())))


from math import *

t = int(input())
for case in range(t):
    n = int(input())
    print(1/(tan(pi/(2*n))))


import sys
import math

input = sys.stdin.readline
flush = sys.stdout.flush

for _ in range(int(input())):
	n = int(input())
	print(1.0 / math.tan(math.pi / (2.0 * n)))


"""
arr = list(map(int, input().split()))
n,k=map(int, input().split())
"""
import math
import sys
# input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(list(map(int,input().split())))

test_cases = int(input())
for _ in range(test_cases):
    sides = int(input())
    sides *= 2
    apothem = 1 / (2 * math.tan((180 / sides) * (math.pi/180)))   
    print(2 * apothem)
# for _ in range(test_cases):
#     size = int(input())
#     arr = inlt()
#     maxx = -float('inf')
#     temp = []
#     max_diff = 0
#     #Checks the maximum number and difference of decreasing numbers, the moment it increases again, it rechecks for a bigger difference
#     for i in range(size):
#         if arr[i] < maxx:
#             max_diff = max(max_diff, maxx - arr[i])
#         maxx = max(arr[i], maxx)
#     i = 0
#     index = 0
#     while i < max_diff:
#         i += 2 ** index
#         index += 1
#     print(index)


import math
T = int(input())
for i in range(T):
    x = 2*int(input())
    print(1/math.tan(math.pi/x))


from math import cos, pi, sin

for _ in range(int(input())):
    n = int(input())
    alpha = pi / (n * 2)
    print(cos(alpha) / sin(alpha))


from math import tan, pi
for _ in range(int(input())):
    n = int(input())
    n *= 2
    print(1/tan(pi/n))


import math
import sys

#sys.stdin = open("in.txt")

t = int(input())
for i in range(t):
    n = int(input())
    n *= 2
    a = (n - 2) * math.pi / n / 2
    r = 1/2 * math.tan(a)
    print(2*r)


import math
import sys
input = sys.stdin.readline


t = int(input())
for _ in range(t):
    n = int(input())
    theta = 2 * n
    print(1 / math.tan(math.radians(360 / 4 / n)))

from math import sin, pi

n = int(input())

def f(a, b):
    return sin((b * pi) / a) / sin(pi / a)

for _ in range(n):
    m = int(input())
    if m % 2 == 0:
        print("%.12f" % f(2 * m, m - 1))
    else:
        print("%.12f" % f(2 * m, m))


from math import*
for _ in range(int(input())):
  n=int(input())
  if n%2==0:
    print(1/tan(radians(90/n)))

from math import sin, pi, sqrt, tan


def read_int():
    return int(input())


def read_ints():
    return list(map(int, input().split(' ')))


t = read_int()
for case_num in range(t):
    n = read_int()
    angle = pi / n / 2
    r = 1 / tan(angle)
    print('{:.9f}'.format(r))


import math

import sys
input = sys.stdin.readline

Q = int(input())
Query = [int(input()) for _ in range(Q)]

for N in Query:
    if N%2 == 0:
        print(1/math.tan(math.pi/(N*2)))

import math
t = int(input())
for i in range(0,t):
    a = int(input())
    pi = math.pi
    print(round(1/math.tan(pi/(2*(a))),9))


from math import cos,sin,pi
t = int(input())
for test in range(t):
    n = int(input())
    if n == 2:
        print(1.)
    else:
        print(sin(pi/n)/(1-cos(pi/n)))

import math
t = int(input())
for _ in range(t):
    n = int(input())
    print(1/math.tan(math.pi/(2*n)))


import random
import math
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("Yes")
no = lambda: print("No")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()
#---khan17---template
t = II()
for q in range(t):
	n = II()
	R = 1/(2*math.sin(math.pi/(2*n)))
	r = math.sqrt(R**2-0.25)
	print(2*r)

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import sin, pi, cos
    input = sys.stdin.readline

    for _ in range(int(input())):
        N = int(input())
        NN = N*2

        print(cos(pi / NN) / sin(pi / NN))


def __starting_point():
    main()

__starting_point()

import math
t = int(input())


for ti in range(t):
	n = int(input())
	# n is even
	# if n == 2:
	# 	print(1)
	a = math.pi / (2*n)
	side = (1/math.tan(a))
	print(side)	


# try:

	# raise Exception
# except:
	# print("-1")
	


# thenos.sort(key=lambda x: x[2], reverse=True)

# int(math.log(max(numbers)+1,2))
# 2**3 (power)




import math as m

def fu(a):
    return (a/180)*m.pi

t=int(input())
for _ in range(t):
    n=int(input())
    a=n//2-1
    b=180-360/(2*n)
    s=0
    for i in range(1,a+1):
        s=s+m.cos(fu(i*b-(2*i-1)*90))
    print(2*s+1)

import sys
from math import tan, pi

_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
from itertools import islice, cycle


def go():
    n = int(input())
    # a,b,c,d = map(int, input().split())
    # a = list(map(int, input().split()))
    # s = input()

    return  1/(tan(pi/(2*n)))


# x,s = map(int,input().split())
t = int(input())
# t = 1
ans = []
for _ in range(t):
    # print(go())
    ans.append(str(go()))
#
print('\n'.join(ans))


import math

t=int(input())

while(t):
	t-=1
	n=int(input())

	ang= math.pi/(2*n)

	ans= 1/math.tan(ang)
	print(ans)

import math


def main():
    n = int(input())
    a = math.pi/(2*n)
    x = 1 / (math.sin(a)) / 2
    res = 2 * math.cos(a) * x
    print(res)


for _ in range(int(input())):
    main()


import math
for nt in range(int(input())):
	n=int(input())
	m=2*n
	a=((m-2)*180)/m
	s=180-a
	t=s
	ans=0
	for i in range((n-2)//2):
		# print (t,ans)
		ans+=(math.cos((t*math.pi)/180))
		t+=s
	print(ans*2+1)


import os
import sys
if os.path.exists('/mnt/c/Users/Square/square/codeforces'):
    f = iter(open('C.txt').readlines())
    def input():
        return next(f).strip()
    # input = lambda: sys.stdin.readline().strip()  
else:
    input = lambda: sys.stdin.readline().strip()

fprint = lambda *args: print(*args, flush=True)

import math

t = int(input())
for _ in range(t):
    n = int(input())
    print(1.0 / math.tan(math.pi / 2 / n))

from math import sin, pi
def solve():
    n = int( input())
    return(sin(((n-1)*pi/(2*n)))/sin(pi/(2*n)))
    
def main():
    t = int( input())
    print("\n".join( map( str, [ solve() for _ in range(t)])))
def __starting_point():
    main()

__starting_point()

from math import *
for _ in range(int(input())):
    n = 2 * int(input())
    a = pi - (pi * (n - 2) / n)
    ans = 0
    for i in range(1, n // 4):
        ans += cos(i * a)
    print(2 * ans + 1)

import math 
r=math.pi
for _ in range(int(input())):
    N=int(input())
    w=2*N
    t=(math.cos(r/w))/(math.sin(r/w))
    print(t)

from math import tan, pi
t = int(input())
for _ in range(t):
    n = int(input())
    print(1 / tan(pi / (2 * n)))


import math
q = int(input())
for _ in range(q):
	n = int(input())
	n*=2
	print(math.tan(math.pi/2-math.pi/n))

from math import sin,pi,radians
def solve():
    n = int(input())*2
    a = 180*(n-2)/n
    bc = (180-a)/2
    d = 0.5/sin(radians(bc))      
    return round(2*(d**2-0.25)**0.5,8)                      
for _ in range(int(input())):
    print(solve())

import sys
import math
# from collections import deque
# import heapq
# from math import inf
# from math import gcd

# print(help(deque))
# 26
pprint = lambda s: print(' '.join(map(str, s)))
input = lambda: sys.stdin.readline().strip()
ipnut = input
# a, b, c, d = map(int, input().split())
# n = int(input())
# e = list(map(int,input().split()))
for i in range(int(input())):
    n = int(input())
    print(1/math.tan(math.pi/(2*n)))
"""
10
10 11 12 13 14 15 16 17 11 11
"""


T = int(input())
import math
n = [0]*T
m = [0]*T
a = [0]*T
p = [0]*T


for t in range(T):
  n = 2*int(input())   #,m[t] = [int(i) for i in input().split(' ')]
  #a = [int(i) for i in input().split(' ')]
  out = 0
  if n%4 == 0:
    print((math.tan(math.pi/n))**-1)
  else:
    print((math.sin(math.pi/n))**-1)

from math import pi, sin

for i in range(int(input())):
    n = int(input())
    a = 0
    ans = 0
    x = pi - pi * (n - 1) / n
    for j in range(n - 1):
        a += x
        ans += sin(a)
    print(ans)