
from __future__ import annotations


def     UpperCamelCase      (					__lowerCamelCase  :				str					):
       snake_case :     int
       snake_case :     list[str]           =   list(__lowerCamelCase					)
       snake_case       ,      snake_case :     Optional[int]           =   _vector[:-1], int(_vector[-1]					)
       snake_case :     list[int]           =   [int(__lowerCamelCase					) for digit in __vector]

       vector.reverse()
       for i, digit in enumerate(__lowerCamelCase					):
              if i & 1 == 0:
                     snake_case :     int           =   digit * 2
                     if doubled > 9:
                            doubled -= 9
                     check_digit += doubled
              else:
                     check_digit += digit

       return check_digit % 10 == 0


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   assert is_luhn("""79927398713""")
   assert not is_luhn("""79927398714""")







def     UpperCamelCase      (					__lowerCamelCase  :				int = 998001					):
       snake_case :     Optional[Any]           =   0
       for i in range(999       ,      99       ,      -1					):  # 3 digit numbers range from 999 down to 100
              for j in range(999       ,      99       ,      -1					):
                     snake_case :     Tuple           =   str(i * j					)
                     if product_string == product_string[::-1] and i * j < n:
                            snake_case :     str           =   max(__lowerCamelCase       ,      i * j					)
       return answer


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





