Harmonic Number

TimeLimit:3000MS  MemoryLimit:128MB
64-bit integer IO format:%lld
Special Judge
未提交 | 登录后收藏
Problem Description

In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:


In this problem, you are given n, you have to find Hn.

Input

Input starts with an integer T (≤ 10000), denoting the number of test cases.

Each case starts with a line containing an integer n (1 ≤ n ≤ 108).

Output

For each case, print the case number and the nth harmonic number. Errors less than 10-8 will be ignored.

SampleInput
12
1
2
3
4
5
6
7
8
9
90000000
99999999
100000000
SampleOutput
1
1.5
1.8333333333
2.0833333333
2.2833333333
2.450
2.5928571429
2.7178571429
2.8289682540
18.8925358988
18.9978964039
18.9978964139
Submit
题目统计信息详细
总AC数52
通过人数30
尝试人数32
总提交量119
AC率25.21%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: