
"""simple docstring"""



import math
def 					lowerCamelCase   (     _snake_case ):
    UpperCAmelCase__	:      Union[str, Any]     							=					math.loga(math.sqrt(4 * positive_integer + 1 ) / 2 + 1 / 2 )

    return exponent == int(_snake_case )
def 					lowerCamelCase   (     _snake_case = 1 / 12345 ):
    UpperCAmelCase__	:      Optional[int]     							=					0
    UpperCAmelCase__	:      Optional[Any]     							=					0

    UpperCAmelCase__	:      Optional[int]     							=					3
    while True:
        UpperCAmelCase__	:      Optional[Any]     							=					(integer**2 - 1) / 4
        # if candidate is an integer, then there is a partition for k
        if partition_candidate == int(_snake_case ):
            UpperCAmelCase__	:      List[Any]     							=					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() = }')



"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


UpperCamelCase__          =	{
    'configuration_mega': ['MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MegaConfig', 'MegaOnnxConfig'],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCamelCase__          =	[
        'MEGA_PRETRAINED_MODEL_ARCHIVE_LIST',
        'MegaForCausalLM',
        'MegaForMaskedLM',
        'MegaForMultipleChoice',
        'MegaForQuestionAnswering',
        'MegaForSequenceClassification',
        'MegaForTokenClassification',
        'MegaModel',
        'MegaPreTrainedModel',
    ]

if TYPE_CHECKING:
    from .configuration_mega import MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP, MegaConfig, MegaOnnxConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_mega import (
            MEGA_PRETRAINED_MODEL_ARCHIVE_LIST,
            MegaForCausalLM,
            MegaForMaskedLM,
            MegaForMultipleChoice,
            MegaForQuestionAnswering,
            MegaForSequenceClassification,
            MegaForTokenClassification,
            MegaModel,
            MegaPreTrainedModel,
        )

else:
    import sys

    UpperCamelCase__          =	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

