hdu 5879 Cure 2016ACM/ICPC青岛赛区网络赛1002

来源:互联网 发布:安装ubuntu分区顺序 编辑:程序博客网 时间:2024/05/15 12:54

Problem Description
Given an integer n, we only want to know the sum of 1/k2 where k from 1 to n.
 

Input
There are multiple cases.
For each test case, there is a single line, containing a single positive integer n
The input file is at most 1M.
 

Output
The required sum, rounded to the fifth digits after the decimal point.
 

Sample Input
124815
 

Sample Output
1.000001.250001.423611.527421.58044

小数据暴力一下,k->inf的时候数列之和收敛π^2/6【当时是敲了个暴力然后把1000w以上的直接用1000w输出了】


0 0
原创粉丝点击