-->
当前位置:首页 > 题库

PROGRAMMING:Finding the approximate value of e

Luz5年前 (2021-05-10)题库425
The natural constant $$e $$can be expressed as Series $$1 + 1 / 1+ 1/2!+\ cdots +1/n! +\ Cdots $$. This problem requires to find the sum of the first $$n + 1 $$terms of the series for a given non negative integer $$n $.
###Input format:
The first line of input gives the non negative integer $$n $$($$Le 1000 $$).
###Output format:
Output the value of partial sum in one line, keeping eight decimal places.
###Input example:
```in
ten
```
###Output example:
```out
two point seven one eight two eight one eight zero
```






answer:If there is no answer, please comment