

from __future__ import annotations

import math
def 						_snake_case(    SCREAMING_SNAKE_CASE__			:	int      )							->      bool:





    '''simple docstring'''






    if 1 < number < 4:
        # 2 and 3 are primes
        return True
    elif number < 2 or number % 2 == 0 or number % 3 == 0:
        # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
        return False

    # All primes number are in format of 6k +/- 1
    for i in range(5    ,			int(math.sqrt(SCREAMING_SNAKE_CASE__      ) + 1      )    ,			6      ):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True
def 						_snake_case(    SCREAMING_SNAKE_CASE__			:	int      )							->      list[int]:





    '''simple docstring'''






    A__          =   str(SCREAMING_SNAKE_CASE__      )
    A__          =   [n]
    for i in range(1    ,			len(SCREAMING_SNAKE_CASE__      )      ):
        list_nums.append(int(str_num[i:]      )      )
        list_nums.append(int(str_num[:-i]      )      )
    return list_nums
def 						_snake_case(    SCREAMING_SNAKE_CASE__			:	int      )							->      bool:





    '''simple docstring'''






    if len(str(SCREAMING_SNAKE_CASE__      )      ) > 3:
        if not is_prime(int(str(SCREAMING_SNAKE_CASE__      )[-3:]      )      ) or not is_prime(int(str(SCREAMING_SNAKE_CASE__      )[:3]      )      ):
            return False
    return True
def 						_snake_case(    SCREAMING_SNAKE_CASE__			:	int = 11      )							->      list[int]:





    '''simple docstring'''






    A__          =   []
    A__          =   13
    while len(SCREAMING_SNAKE_CASE__      ) != count:
        if validate(SCREAMING_SNAKE_CASE__      ):
            A__          =   list_truncated_nums(SCREAMING_SNAKE_CASE__      )
            if all(is_prime(SCREAMING_SNAKE_CASE__      ) for i in list_nums      ):
                list_truncated_primes.append(SCREAMING_SNAKE_CASE__      )
        num += 2
    return list_truncated_primes
def 						_snake_case(    )							->      int:





    '''simple docstring'''






    return sum(compute_truncated_primes(11      )      )


if __name__ == "__main__":
     print(f"""{sum(compute_truncated_primes(11)) = }""")




from timeit import timeit
def 						_snake_case(    SCREAMING_SNAKE_CASE__			:	int      )							->      int:





    '''simple docstring'''






    if number < 0:
        raise ValueError('the value of input must not be negative'      )
    A__          =   0
    while number:
        number &= number - 1
        result += 1
    return result
def 						_snake_case(    SCREAMING_SNAKE_CASE__			:	int      )							->      int:





    '''simple docstring'''






    if number < 0:
        raise ValueError('the value of input must not be negative'      )
    A__          =   0
    while number:
        if number % 2 == 1:
            result += 1
        number >>= 1
    return result
def 						_snake_case(    )							->      None:





    '''simple docstring'''






    def do_benchmark(SCREAMING_SNAKE_CASE__			:	int      ) -> None:
        A__          =   'import __main__ as z'
        print(f'Benchmark when {number = }:'      )
        print(f'{get_set_bits_count_using_modulo_operator(SCREAMING_SNAKE_CASE__      ) = }'      )
        A__          =   timeit('z.get_set_bits_count_using_modulo_operator(25)'    ,			setup=SCREAMING_SNAKE_CASE__      )
        print(f'timeit() runs in {timing} seconds'      )
        print(f'{get_set_bits_count_using_brian_kernighans_algorithm(SCREAMING_SNAKE_CASE__      ) = }'      )
        A__          =   timeit(
            'z.get_set_bits_count_using_brian_kernighans_algorithm(25)'    ,			setup=SCREAMING_SNAKE_CASE__    ,			)
        print(f'timeit() runs in {timing} seconds'      )

    for number in (25, 37, 58, 0):
        do_benchmark(SCREAMING_SNAKE_CASE__      )
        print()


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     benchmark()

