Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Recent
Login
Problem F: 调和级数
Problem F: 调和级数
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
1211
Solved:
819
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
H(n)=1/1+1/2+1/3+…+1/n。这种数列被称为调和级数。
输入正整数n,输出H(n)
的值,保留3位小数。
Sample Input
3
Sample Output
1.833