CHI_EXP - The real exponential

no tags 

Compute 101 significant figures of the exponential of a real number.

Input

The first line of the input contains the number of test cases. In each of the following lines, a single real number –100 ≤ x ≤ 100 is given, in the usual decimal notation. The number of decimal digits of x is not more than 101.

Output

Each line of the output should be the sequence consisting of the first 101 significant decimal digits of the exponential of x. All trailing and leading zeroes, as well as the decimal point (if any) should be removed.

Score

For each test case, let K be the first position of the digit where the first difference to the reference solution occurred. Then the score awarded to the test case will be K–1 divided by the number of digits M ≤ 101 in the reference solution. If all digits match, K = M+1 is understood. For example, let us say a particular output has the first 50 digits of exp(1) correct, and the 51-st digit is different from that of the reference solution. Then this particular test case would receive the score of 50/101 ≈ 0.5 (50%). The final score of the problem is the sum of the scores over all test cases, normalized so that the maximum possible score is 10.

Example

Input:
3
0
1
-3.14159265358979323846264338327950288

Output:
1
27182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274
43213918263772249774417737171728011457104245174434972327166908869626900798351779694542372009588635587

hide comments
mr_geeksman: 2021-04-01 10:20:36

Easy go with python

[Rampage] Blue.Mary: 2016-02-26 09:17:48

Put this problem into "partial score" section.


Added by:chi
Date:2016-02-25
Time limit:1s-1.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU JS-MONKEY