Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat problems/for/approaching-the-square-root-of-two

Approaching the square root of two

Author Iqbolshoh Ilhomjonov 3 @iqbolshoh 650 problems
Medium 1000 ms 64 MB 45%
Share

A positive integer is given. Compute the first terms of a sequence converging to by the rule:

A sequence converging to the square root of two

Input

One positive integer .

Output

One line with numbers separated by spaces: , each with exactly 5 digits after the decimal point (for example, 1.00000 1.50000 1.40000 1.41667).

Note

Examples

Input #1
4
Output #1
1.00000 1.50000 1.40000 1.41667
Input #2
6
Output #2
1.00000 1.50000 1.40000 1.41667 1.41379 1.41429

Sign in to submit a solution

Signing up is free and takes a minute.