~/algor $ cat problems/for/approaching-the-square-root-of-two
Approaching the square root of two
Medium
1000 ms
64 MB
45%
A positive integer is given. Compute the first terms of a sequence converging to by the rule:
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