






"""simple docstring"""



import math



def 						lowercase    (				__snake_case				: int	):
		lowercase_ : List[str]							       =   math.loga(math.sqrt(4 * positive_integer + 1	) / 2 + 1 / 2	)

		return exponent == int(__snake_case	)



def 						lowercase    (				__snake_case				: float = 1 / 1_2_3_4_5	):
		lowercase_ : List[str]							       =   0
		lowercase_ : List[Any]							       =   0

		lowercase_ : Dict							       =   3
		while True:
				lowercase_ : str							       =   (integer**2 - 1) / 4
				# if candidate is an integer, then there is a partition for k
				if partition_candidate == int(__snake_case	):
						lowercase_ : str							       =   int(__snake_case	)
						total_partitions += 1
						if check_partition_perfect(__snake_case	):
								perfect_partitions += 1
				if perfect_partitions > 0:
						if perfect_partitions / total_partitions < max_proportion:
								return int(__snake_case	)
				integer += 1


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








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_lowercase: Union[str, Any]      			=		{
    "configuration_bridgetower": [
        "BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "BridgeTowerConfig",
        "BridgeTowerTextConfig",
        "BridgeTowerVisionConfig",
    ],
    "processing_bridgetower": ["BridgeTowerProcessor"],
}

try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowercase: Dict      			=		["BridgeTowerImageProcessor"]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowercase: int      			=		[
				    "BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "BridgeTowerForContrastiveLearning",
				    "BridgeTowerForImageAndTextRetrieval",
				    "BridgeTowerForMaskedLM",
				    "BridgeTowerModel",
				    "BridgeTowerPreTrainedModel",
				]


if TYPE_CHECKING:
				from .configuration_bridgetower import (
				    BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    BridgeTowerConfig,
				    BridgeTowerTextConfig,
				    BridgeTowerVisionConfig,
				)
				from .processing_bridgetower import BridgeTowerProcessor

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .image_processing_bridgetower import BridgeTowerImageProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_bridgetower import (
								    BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    BridgeTowerForContrastiveLearning,
								    BridgeTowerForImageAndTextRetrieval,
								    BridgeTowerForMaskedLM,
								    BridgeTowerModel,
								    BridgeTowerPreTrainedModel,
								)


else:
				import sys

				_lowercase: Optional[Any]      			=		_LazyModule(__name__, globals()["__file__"], _import_structure)
