-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathC1.cpp
29 lines (26 loc) · 795 Bytes
/
C1.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <bits/stdc++.h>
typedef long long ll;
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define FOR(i,a,b) for( ll i = (ll)(a); i <= (ll)(b); i++ )
#define ROF(i,a,b) for( ll i = (ll)(a); i >= (ll)(b); i-- )
#define debug(x) cerr << "[DEBUG] " << #x << " = " << x << endl;
#define matrix vector< vector<ll> >
#define F first
#define S second
#define mp make_pair
#define INPFILE freopen("input.in","r",stdin)
#define OUTFILE freopen("output.out","w",stdout)
#define BOOST ios_base::sync_with_stdio(false); cin.tie(NULL)
using namespace std;
const double PI = 3.141592653589793;
int main() {
ll t; cin >> t;
while (t--) {
ll n; cin >> n;
n *= 2;
double c = cos(PI / n);
double s = sin(PI / n);
cout << fixed << setprecision(9) << c / s << '\n';
}
}