[BOJ 6376] e 계산

View as PDF

Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 128M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

e는

[e=\sum_{i=0}^{n} {\frac{1}{i!}}]

이다. 여기서 n은 무한대이다.

매우 작은 n에 대해서, e의 근사값을 구해보자.

입력 형식

출력 형식

아래 결과와 같은 형식으로 e의 근사값을 n = 0부터 9까지 출력한다. 

예제 입력

예제 출력

n e
- -----------
0 1
1 2
2 2.5
3 2.666666667
4 2.708333333

Comments

There are no comments at the moment.