




from __future__ import annotations

def      A      (      _SCREAMING_SNAKE_CASE    )	-> bool:
       lowerCamelCase   :      int			 =					str(_SCREAMING_SNAKE_CASE    )
       return len(_SCREAMING_SNAKE_CASE    ) == 9 and set(_SCREAMING_SNAKE_CASE    ) == set("123456789"    )

def      A      (      )	-> int | None:
       for base_num in range(9999 ,4999 ,-1    ):
              lowerCamelCase   :      int			 =					10_0002 * base_num
              if is_9_pandigital(_SCREAMING_SNAKE_CASE    ):
                     return candidate

       for base_num in range(333 ,99 ,-1    ):
              lowerCamelCase   :      str			 =					100_2003 * base_num
              if is_9_pandigital(_SCREAMING_SNAKE_CASE    ):
                     return candidate

       return None


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












import numpy as np
from sklearn.datasets import fetch_california_housing
from sklearn.metrics import mean_absolute_error, mean_squared_error
from sklearn.model_selection import train_test_split
from xgboost import XGBRegressor

def      A      (      _SCREAMING_SNAKE_CASE    )	-> tuple:
       return (data["data"], data["target"])

def      A      (      _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )	-> np.ndarray:
       lowerCamelCase   :      List[str]			 =					XGBRegressor(verbosity=0 ,random_state=42    )
       xgb.fit(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
       # Predict target for test data
       lowerCamelCase   :      List[Any]			 =					xgb.predict(_SCREAMING_SNAKE_CASE    )
       lowerCamelCase   :      Tuple			 =					predictions.reshape(len(_SCREAMING_SNAKE_CASE    ) ,1    )
       return predictions

def      A      (      )	-> None:
       lowerCamelCase   :      Dict			 =					fetch_california_housing()
       lowerCamelCase ,      lowerCamelCase   :      Tuple			 =					data_handling(_SCREAMING_SNAKE_CASE    )
       lowerCamelCase ,      lowerCamelCase ,      lowerCamelCase ,      lowerCamelCase   :      Optional[Any]			 =					train_test_split(
           _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,test_size=0.25 ,random_state=1    )
       lowerCamelCase   :      Any			 =					xgboost(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
       # Error printing
       print(f'''Mean Absolute Error : {mean_absolute_error(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )}'''    )
       print(f'''Mean Square Error  : {mean_squared_error(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )}'''    )


if __name__ == "__main__":
       import doctest

       doctest.testmod(verbose=True)
       main()






