Problem1396--求和IV

1396: 求和IV

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

求-1/2-1/4-1/6……-1/n的值。(n为偶数且大于等于2,结果保留5位小数,结果后有一换行。提示:采用循环输入while(scanf()!=EOF)形式)

Input

20
50
100
500
1000

Output

-1.46448
-1.90798
-2.24960
-3.05034
-3.39641

Sample Input Copy

20
50
100
500
1000

Sample Output Copy

-1.46448
-1.90798
-2.24960
-3.05034
-3.39641

Source/Category

admin