
"""simple docstring"""



import os

# Precomputes a list of the 100 first triangular numbers
UpperCamelCase__          =	[int(0.5 * n * (n + 1)) for n in range(1, 1_01)]
def 					lowerCamelCase   (     ):
    UpperCAmelCase__	:      List[Any]     							=					os.path.dirname(os.path.realpath(_snake_case ) )
    UpperCAmelCase__	:      Optional[Any]     							=					os.path.join(_snake_case    ,'words.txt' )

    UpperCAmelCase__	:      Any     							=					''
    with open(_snake_case ) as f:
        UpperCAmelCase__	:      int     							=					f.readline()

    UpperCAmelCase__	:      Optional[Any]     							=					[word.strip('"' ) for word in words.strip('\r\n' ).split(',' )]
    UpperCAmelCase__	:      Tuple     							=					[
        word
        for word in [sum(ord(_snake_case ) - 64 for x in word ) for word in words]
        if word in TRIANGULAR_NUMBERS
    ]
    return len(_snake_case )


if __name__ == "__main__":
    print(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__)

