feat: program to compute e
This commit is contained in:
parent
e5ed1a444c
commit
d6deaa6c07
1 changed files with 13 additions and 0 deletions
13
euler/main.py
Normal file
13
euler/main.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
digits = int(input())
|
||||
|
||||
total = 0
|
||||
|
||||
for i in range(1, digits+1):
|
||||
total += (1 + (1/i))**i
|
||||
|
||||
total = str(total).replace(".", "")
|
||||
total = list(total)
|
||||
|
||||
total.insert(1, ".")
|
||||
|
||||
print(''.join(total))
|
Loading…
Reference in a new issue