1389 Γ函数


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

传说Γ(n+1)≈sqrt(2npi)*pow(n/e,n),n为浮点数, 其中pi=acos(-1.0),e=exp(1.0), 若已知Γ(n+1)的值,你能求出n的近似值吗?

Input

输入有多行, 每行1个浮点数, 0表示结束。

Output

对于每组输入,输出n(输入数据保证0<n<1000) ,要求保留3位小数。

Sample

Input

1
2
3
4
0

Output

1.151
2.043
2.437
2.691

Source: 仙剑魔


Comments

There are no comments at the moment.