B. 【例28.2】 求出e的值

    Type: Default 1000ms 128MiB

【例28.2】 求出e的值

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

Using the formula e = 1 + 1/1! + 1/2! + 1/3! + ... + 1/n!, calculate the value of e.

Input Format

Input consists of a single line containing an integer n (2 ≤ n ≤ 15).

Output Format

Output consists of a single line containing the calculated value of e, printed with 10 decimal places.

Sample

10
2.7182818011

20251101B班作业(5)

Not Claimed
Status
Done
Problem
4
Open Since
2025-11-1 0:00
Deadline
2025-11-9 23:59
Extension
24 hour(s)