#T530. 倒数累加
倒数累加
Description
Read in and compute the value of $S = 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \ldots + \frac{1}{n}$. Output the result left-aligned, rounded to 10 decimal places.
Input Format
Input a number .
Output Format
Output .
6
0.6166666667
Hint
Data Range:
1 <= <= 100
Source
CodesOnline