





import math

def       A__(		__lowerCAmelCase ):
    _snake_case :			Any  						=   math.loga(math.sqrt(4 * positive_integer + 1 ) / 2 + 1 / 2 )

    return exponent == int(__lowerCAmelCase )

def       A__(		__lowerCAmelCase = 1 / 1_23_45 ):
    _snake_case :			str  						=   0
    _snake_case :			Optional[Any]  						=   0

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


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













from typing import TYPE_CHECKING

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


lowercase_		:				Optional[int]				=						{
    '''configuration_mega''': ['''MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MegaConfig''', '''MegaOnnxConfig'''],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase_		:				Any				=						[
		    '''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

		lowercase_		:				str				=						_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






