~/algor $ cat problems/while-garmonik-qator-a-dan-katta
Harmonic series above a
Easy
1000 ms
64 MB
27%
A real number $a$ is given ($a \gt 1$). Find the smallest positive integer $k$ for which the sum of the harmonic series is greater than $a$, and the sum itself:
$$S = 1 + \frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{k}$$
Input
One real number $a$.
Output
One line with two numbers separated by a space: the integer $k$ and $S$ with exactly 4 digits after the decimal point (for example, 3 1.8333).
Note
$1.1 \le a \le 5.0$
Examples
Input #1
1.5
Output #1
3 1.8333
Input #2
2.0
Output #2
4 2.0833