F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Cure

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 9917    Accepted Submission(s): 1949


Problem Description
Given an integer $n$, we only want to know the sum of $1/k^2$ 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
1 2 4 8 15
 

Sample Output
1.00000 1.25000 1.42361 1.52742 1.58044
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-04 08:36:44, Gzip enabled