[Login|Register]
Problems

Status

Rank

Statistics

Problem D
数列求和
Time Limit: 1000ms
Memory Limit: 65536kb
Description
有一列数:2/1,3/2,5/3,8/5,13/8,21/13,...求出这个数列的前n(n<=50)项和,小数点后保留6位
Input
有多组输入数据,每组数据表示一个n
Output
输出Description中列出的数组的前n项和
Sample Input
1
2
Sample Output
2.000000
3.500000
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 1.6ms with 2 query(s).