





"""simple docstring"""


import math
from timeit import timeit





def 							a__			(  _UpperCAmelCase	)    ->  int:

 '''simple docstring'''






 snake_case__    							=				0
 snake_case__    							=				abs(_UpperCAmelCase	)
 while True:
  snake_case__    							=				n // 1_0
  digits += 1
  if n == 0:
   break
 return digits





def 							a__			(  _UpperCAmelCase	)    ->  int:

 '''simple docstring'''






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





def 							a__			(  _UpperCAmelCase	)    ->  int:

 '''simple docstring'''






 return len(str(abs(_UpperCAmelCase	)	)	)





def 							a__			(  )    ->  None:

 '''simple docstring'''






 from collections.abc import Callable

 def benchmark_a_function(_UpperCAmelCase	,     _UpperCAmelCase	) -> None:
  snake_case__    							=				f"{func.__name__}({value})"
  snake_case__    							=				timeit(f"__main__.{call}"	,     setup="import __main__"	)
  print(f"{call}: {func(_UpperCAmelCase	)} -- {timing} seconds"	)

 for value in (2_6_2_1_4_4, 1_1_2_5_8_9_9_9_0_6_8_4_2_6_2_4, 1_2_6_7_6_5_0_6_0_0_2_2_8_2_2_9_4_0_1_4_9_6_7_0_3_2_0_5_3_7_6):
  for func in (num_digits, num_digits_fast, num_digits_faster):
   benchmark_a_function(_UpperCAmelCase	,     _UpperCAmelCase	)
  print()


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   benchmark()








"""simple docstring"""


from math import sqrt





def 							a__			(  _UpperCAmelCase	)    ->  list[int]:

 '''simple docstring'''






 snake_case__    							=				[1]
 for i in range(2	,     int(sqrt(_UpperCAmelCase	)	) + 1	,     1	):
  if number % i == 0:
   values.append(_UpperCAmelCase	)
   if int(number // i	) != i:
    values.append(int(number // i	)	)
 return sorted(_UpperCAmelCase	)





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return sum(factors(_UpperCAmelCase	)	) > n





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 snake_case__    							=				factors(_UpperCAmelCase	)
 snake_case__    							=				len(_UpperCAmelCase	)
 snake_case__    							=				[[0 for i in range(number + 1	)] for j in range(r + 1	)]
 for i in range(r + 1	):
  snake_case__    							=				True

 for i in range(1	,     number + 1	):
  snake_case__    							=				False

 for i in range(1	,     r + 1	):
  for j in range(1	,     number + 1	):
   if j < values[i - 1]:
    snake_case__    							=				subset[i - 1][j]
   else:
    snake_case__    							=				subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

 return subset[r][number] != 0





def 							a__			(  _UpperCAmelCase	)    ->  bool:

 '''simple docstring'''






 return abundant(_UpperCAmelCase	) and not semi_perfect(_UpperCAmelCase	)


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   for number in (6_9, 7_0, 7_1):
      print(f'''{number} is {'' if weird(number) else 'not '}weird.''')

