Problem1262--求e的近似值

1262: 求e的近似值

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 1
[Submit] [Status] [Web Board] [Creator:]

Description

自然常数e可以用级数1+1/1!+1/2!+⋯+1/n!来近似计算。本题要求对给定的非负整数n,求该级数的前n项和。

Input

输入第一行中给出非负整数n(≤1000)。

Output

输入第一行中给出非负整数n(≤1000)。

Sample Input Copy

10

Sample Output Copy

2.7182818

Source/Category