eolymp
bolt
Try our new interface for solving problems
Məsələlər

God Create Math

God Create Math

There is a saying: computer was the crystallization of men' intelligence, but math is from god. Today, god also sends us a problem. \includegraphics{https://static.e-olymp.com/content/e6/e637806c18a3ba3f5107dc704e1fa4141062d1b2.jpg} Some explanations: In \textbf{sin(x)}, \textbf{x} is a radian. \textbf{0! = 1}, \textbf{n! = (n-1)! · n} (\textbf{n} ≥ \textbf{1}). \textbf{\[x\]} is the integer part of a floating number. \textbf{fib(0) = fib(1) = 1}, and \textbf{fib(n) = fib(n-1) + fib(n-2)} (\textbf{n} ≥ \textbf{2}). Your task is calculating the value with a given \textbf{N}. \InputFile The first line contains a single integer \textbf{T}, indicating the number of test cases. Each test case contains one integer \textbf{N} (\textbf{1}≤ \textbf{N} ≤ \textbf{1000000000}). \OutputFile For each test case, output the result rounded to three fractional digits.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
3 
1 
4 
10
Çıxış verilənləri #1
0.000
0.581
0.978
Mənbə 2010 Wuhan University 4th "Eming" Cup Programming Contest