問題一覧 > 教育的問題

No.3359 Approximation of the Bring Radical to 3 Decimal Places

レベル : / AI推定難易度 : 500 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 38
作問者 : 👑 p-adic / テスター : 👑 hamamu
お気に入りにしたユーザー ProblemId : 10985 / 自分の提出
問題文最終更新日: 2025-11-06 09:07:52
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 488 小数誤差コンテスト (順位表) の他の問題:

Problem Statement

You are given a non-negative integer $C$.

Find the approximation to $3$ decimal places of the non-negative real number $X$ satisfying the equation $X^5 + X - C = 0$.

Here, the approximation to $3$ decimal places of a real number $x$ means the largest real number that has a decimal representation with up to $3$ decimal places and does not exceed $x$.

It can be proved that the non-negative real number $X$ satisfying $X^5 + X - C = 0$ exists uniquely.

Background

By the Abel–Ruffini theorem, it is known that quintic equations have no general solution formula (an explicit formula using only the four arithmetic operations and radicals), but there is a large body of research on expressing the solutions of quintic equations explicitly using (multivalued) functions other than the four arithmetic operations and radicals.

The quintic equation $X^5 + X - C = 0$ treated in this problem is one of the quintic equations in Bring–Jerrard normal form, and every Bring–Jerrard normal form reduces to this form if the constraint that $C$ is a non-negative integer is removed. The solutions of this quintic equation $X^5 + X - C = 0$ (or $X^5 + X + C = 0$) are called the Bring radicals of $C$, and they give a (complex multivalued) function different from radicals.

Input

The input is given from standard input in $1$ line in the following format:

  • Line $1$ contains $C$.
$C$

Constraints

The input satisfies the following constraints:

  • $C$ is an integer satisfying $0 \leq C < 10^3$.

Output

Print in $1$ line the approximation to $3$ decimal places of the non-negative real number $X$ satisfying $X^5 + X - C = 0$, as an unsigned decimal representation with exactly $3$ digits after the decimal point.

Note that this problem does not allow for floating-point error tolerance.

Print a newline at the end.

Sample

Sample 1
Input
0
Output
0.000

We have $X = 0$, and the approximation to $3$ decimal places of $X$ is $0$. Therefore, print 0.000, the unsigned decimal representation of $0$ with exactly $3$ digits after the decimal point.

Sample 2
Input
1
Output
0.754

We have $X = 0.754 \cdots$, and the approximation to $3$ decimal places of $X$ is $0.754$. Therefore, print 0.754, the unsigned decimal representation of $0.754$ with exactly $3$ digits after the decimal point.

Sample 3
Input
2
Output
1.000

We have $X = 1$, and the approximation to $3$ decimal places of $X$ is $1$. Therefore, print 1.000, the unsigned decimal representation of $1$ with exactly $3$ digits after the decimal point.

Note that since $0.999 \neq 1$, 0.999 is not the unsigned decimal representation of $1$ with exactly $3$ digits after the decimal point.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。