






'''simple docstring'''


import math
from timeit import timeit


def 		__a(SCREAMING_SNAKE_CASE_					:   Optional[int]      ):



    '''simple docstring'''





    _lowerCAmelCase		     = 0
    _lowerCAmelCase		     = abs(SCREAMING_SNAKE_CASE_      )
    while True:
        _lowerCAmelCase		     = n // 10
        digits += 1
        if n == 0:
            break
    return digits


def 		__a(SCREAMING_SNAKE_CASE_					:   Union[str, Any]      ):



    '''simple docstring'''





    return 1 if n == 0 else math.floor(math.log(abs(SCREAMING_SNAKE_CASE_      )						,    10      ) + 1      )


def 		__a(SCREAMING_SNAKE_CASE_					:   Tuple      ):



    '''simple docstring'''





    return len(str(abs(SCREAMING_SNAKE_CASE_      )      )      )


def 		__a():



    '''simple docstring'''





    from collections.abc import Callable

    def benchmark_a_function(SCREAMING_SNAKE_CASE_					:   str						,    SCREAMING_SNAKE_CASE_					:   Dict      ) -> None:
        _lowerCAmelCase		     = F'''{func.__name__}({value})'''
        _lowerCAmelCase		     = timeit(F'''__main__.{call}'''						,    setup="import __main__"      )
        print(F'''{call}: {func(SCREAMING_SNAKE_CASE_      )} -- {timing} seconds'''      )

    for value in (262144, 1125899906842624, 1267650600228229401496703205376):
        for func in (num_digits, num_digits_fast, num_digits_faster):
            benchmark_a_function(SCREAMING_SNAKE_CASE_						,    SCREAMING_SNAKE_CASE_      )
        print()


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       benchmark()









'''simple docstring'''


def 		__a(SCREAMING_SNAKE_CASE_					:   List[Any]						,    SCREAMING_SNAKE_CASE_					:   str      ):



    '''simple docstring'''





    if n < 0:
        return 0
    # table[i] represents the number of ways to get to amount i
    _lowerCAmelCase		     = [0] * (n + 1)

    # There is exactly 1 way to get to zero(You pick no coins).
    _lowerCAmelCase		     = 1

    # Pick all coins one by one and update table[] values
    # after the index greater than or equal to the value of the
    # picked coin
    for coin_val in s:
        for j in range(SCREAMING_SNAKE_CASE_						,    n + 1      ):
            table[j] += table[j - coin_val]

    return table[n]


if __name__ == "__main__":
       import doctest

       doctest.testmod()


