# your code goes here
def soma():
    fat = -1
    somar = 0
    for i in range(1, 11):
        fat = -fat * i
        somar += (11 - i) / fat
    return round(somar, 2)

def fatorial(n):
    if n == 0 or n == 1:
        return 1
    return n * fatorial(n - 1)

def recursivo():
  num_dem = zip(reversed(range(1,11)), range(1,11))
  S = 0
  for num, dem in num_dem:
     fat = fatorial(dem)
     tmp = num/fat
     S += num/fat

from math import factorial

def somar(n):
    soma = cont = 0
    for c in range(n, 0, -1):
        cont += 1
        termo = (c / factorial(cont))
        if cont % 2 == 0:
            soma -= termo
        else:
            soma += termo
    return round(soma, 2)

from timeit import timeit

params = {'number': 200000, 'globals': globals()}

print(timeit('soma()', **params))
print(timeit('somar(10)', **params))
print(timeit('recursivo()', **params))
