#B2079. Calculate the Value of e

    ID: 11161 Type: Default 1000ms 256MiB

Calculate the Value of e

Calculate the Value of e

Calculate the value of \( e \) using the series expansion:

\( e = 1 + \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \cdots + \frac{1}{n!} \)

Print the result rounded to 10 decimal places.

inputFormat

An integer ( n ) (where ( 0 \le n \le 20 )) representing the number of terms (starting from 0) to be used in the series calculation.

outputFormat

The value of ( e ) approximated using the series, printed with exactly 10 digits after the decimal point.

sample

0
1.0000000000