



from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase_	       =			logging.get_logger(__name__)






class 						__a (     SCREAMING_SNAKE_CASE				):
	SCREAMING_SNAKE_CASE       =       "timm_backbone"



	def __init__(						self							:    Union[str, Any]				,	snake_case_							:    List[str]=None				,	snake_case_							:    Tuple=3				,	snake_case_							:    Tuple=True				,	snake_case_							:    int=True				,	snake_case_							:    Union[str, Any]=None				,	**snake_case_							:    str				,	)->							Optional[int]:
						super().__init__(**snake_case_)
						__lowerCAmelCase	   =backbone
						__lowerCAmelCase	   =num_channels
						__lowerCAmelCase	   =features_only
						__lowerCAmelCase	   =use_pretrained_backbone
						__lowerCAmelCase	   =True
						__lowerCAmelCase	   =out_indices if out_indices is not None else (-1,)









def 					__lowerCAmelCase		(  __lowerCamelCase	:    int = 3				,   __lowerCamelCase	:    int = 7				,   __lowerCamelCase	:    int = 1000000	)  ->						int:
					__lowerCAmelCase	   =0
					__lowerCAmelCase	   =1

					for current_denominator in range(1				,   limit + 1	):
										__lowerCAmelCase	   =current_denominator * numerator // denominator
										if current_denominator % denominator == 0:
															current_numerator -= 1
										if current_numerator * max_denominator > current_denominator * max_numerator:
															__lowerCAmelCase	   =current_numerator
															__lowerCAmelCase	   =current_denominator
					return max_numerator


if __name__ == "__main__":
				print(solution(numerator=3, denominator=7, limit=1_00_00_00))




