#1419. C++-循环for-计算S=1/1-1/2+1/3-1/4+1/5-1/6...

C++-循环for-计算S=1/1-1/2+1/3-1/4+1/5-1/6...

Background

Description

C++-循环for-计算S=1/1-1/2+1/3-1/4+1/5-1/6...+(-)1/n

n是需要输入

image

Format

Input

Output

Samples

2
0.5
10
0.645635
100
0.688172

Limitation

1s, 1024KiB for each test case.