3116: 倒数累加(sumfrac) [1*]
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:170
Solved:107
Description
问题:读入n,计算S=1-1/2+1/3-1/4+1/5-1/6+…… 1/n的值。顶格输出,保留小数点后10位。
Input
一个n值
Output
输出s的值
Sample Input Copy
6
Sample Output Copy
0.6166666667