Toggle navigation
万里ACM
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem E: 自然数倒数的平方和
Problem E: 自然数倒数的平方和
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
541
Solved:
108
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
输入正整数N(1≤N≤30),根据公式S
2
/6=1/1
2
+1/2
2
+1/3
2
+...1/N
2
计算S的值
Input
正整数N,1≤N≤30
Output
S的值,按照标准浮点数float类型的默认格式输出计算结果
Sample Input
Copy
1 35
Sample Output
Copy
2.449490 3.114579