P29336 [洛谷] "Wdsr-1" Philosopher's Stone
提高
题目描述

Background

Patchouli Knowledge is a witch skilled in magic, and the synthesis of the Philosopher's Stone is her daily task.

Problem Description

Patchouli has arranged a triangular point array with a side length of $k-1$ (i.e., $k$ points), and each point can and can only hold one elemental stone.

Image

In the netherworld, the equilateral triangle is considered the most beautiful and stable shape. Therefore, elemental stones can only be synthesized into a Philosopher's Stone when three stones form an equilateral triangle in the array.

Patchouli defines that if she randomly selects three points in the array with a side length of $k-1$ to place elemental stones, the probability that these three stones can be synthesized into a Philosopher's Stone is called $P_k$. ($P_1=0, P_2=1$)

Now, to challenge your wisdom, Patchouli wants you to calculate the value of
$$\sum_{k=m}^{+\infty}P_k$$
where $m$ is a given integer.

Input Format

A single line containing an integer $m$.

Output Format

A single line containing a decimal number, representing the answer.

You need to retain 5 significant digits and use scientific notation.

For example:

If the answer is 0.0123, you should output 1.2300x10^-2.

If the answer is 1.2345, you should output 1.2345x10^0.

Sample Input and Output

Sample Input #1

100

Sample Output #1

2.0003x10^-2

Sample Input #2

114

Sample Output #2

1.7546x10^-2

Sample Input #3

223

Sample Output #3

8.9689x10^-3

Notes

Data Range

$$\def\arraystretch{1.5}\begin{array}{|c|c|c|}\hline Subtasks & \textbf{编号} & m \\ \hline 1 & [1,15] & \le 100\\\hline 2 & [16,35] & \le 500\\\hline 3 & [36,40] & \le 10^3\\\hline 4 & [41,45] & \le 10^4\\\hline 5 & [46,50] & \le 65535\\\hline \end{array}$$

Where $[l,r]$ denotes the test points numbered $l, l+1, \cdots, r-1, r$.

  • Additionally, it is guaranteed that $m \ge 1$.
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
100
样例输出
2.0003x10^-2