

def 						_snake_case		(     SCREAMING_SNAKE_CASE = 998001					)							->   int:

     """simple docstring"""







     for number in range(n - 1		,				9999		,				-1					):
          _lowerCAmelCase :       Dict	   =     str(_SCREAMING_SNAKE_CASE					)

          # checks whether 'str_number' is a palindrome.
          if str_number == str_number[::-1]:
               _lowerCAmelCase :       Optional[int]	   =     999

               # if 'number' is a product of two 3-digit numbers
               # then number is the answer otherwise fetch next number.
               while divisor != 99:
                    if (number % divisor == 0) and (len(str(number // divisor					)					) == 3.0):
                         return number
                    divisor -= 1
     raise ValueError("That number is larger than our acceptable range."					)


if __name__ == "__main__":
  print(f'''{solution() = }''')







"""simple docstring"""
def 		__a  (      _SCREAMING_SNAKE_CASE = 100						,	_SCREAMING_SNAKE_CASE = 100  )      ->int:
  return max(
      sum(int(_SCREAMING_SNAKE_CASE  ) for x in str(base**power  )  )
      for base in range(_SCREAMING_SNAKE_CASE  )
      for power in range(_SCREAMING_SNAKE_CASE  )  )


# Tests
if __name__ == "__main__":
 import doctest

 doctest.testmod()


