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:
879
Solved:
656
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
有一分数序列: 0、-3/4、8/9、-15/16、24/25、-35/36......求出这个数列的前N项之和,保留3位小数。
Input
输入正整数n(n≤100)
Output
输出该数列的前n项之和
Sample Input
Copy
5
Sample Output
Copy
0.161