"""simple docstring"""


def 					UpperCAmelCase    (		UpperCAmelCase					)				->      bool:
     return str(UpperCAmelCase					) == str(UpperCAmelCase					)[::-1]







def 					UpperCAmelCase    (		UpperCAmelCase					)				->      int:
     return int(UpperCAmelCase					) + int(str(UpperCAmelCase					)[::-1]					)







def 					UpperCAmelCase    (		UpperCAmelCase = 10000					)				->      int:
     snake_case_					       =					[]
     for num in range(1						,					UpperCAmelCase					):
          snake_case_					       =					0
          snake_case_					       =					num
          while iterations < 50:
               snake_case_					       =					sum_reverse(UpperCAmelCase					)
               iterations += 1
               if is_palindrome(UpperCAmelCase					):
                    break
          else:
               lychrel_nums.append(UpperCAmelCase					)
     return len(UpperCAmelCase					)


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




import os
from collections import namedtuple

import pytest

from datasets import ClassLabel, Features, Sequence, Value
from datasets.commands.test import TestCommand
from datasets.info import DatasetInfo, DatasetInfosDict


A_       : Any         =			namedtuple(
    '_TestCommandArgs',
    [
        'dataset',
        'name',
        'cache_dir',
        'data_dir',
        'all_configs',
        'save_infos',
        'ignore_verifications',
        'force_redownload',
        'clear_cache',
    ],
    defaults=[None, None, None, False, False, False, False, False],
)

def 						UpperCamelCase					(lowercase_: Any    ,      lowercase_: List[str]					)     ->      Optional[int]:
	return (abs(source - target					) / target) < 0.01


@pytest.mark.integration
def 						UpperCamelCase					(lowercase_: str					)     ->      str:
	A__							:    List[str]        =		_TestCommandArgs(dataset=lowercase_    ,      all_configs=lowercase_    ,      save_infos=lowercase_					)
	A__							:    int        =		TestCommand(*lowercase_					)
	test_command.run()
	A__							:    Optional[Any]        =		os.path.join(lowercase_    ,      """README.md"""					)
	assert os.path.exists(lowercase_					)
	A__							:    Dict        =		DatasetInfosDict.from_directory(lowercase_					)
	A__							:    str        =		DatasetInfosDict(
	    {
	        """default""": DatasetInfo(
	            features=Features(
	                {
	                    """tokens""": Sequence(Value("""string"""					)					),
	                    """ner_tags""": Sequence(
	                        ClassLabel(names=["""O""", """B-PER""", """I-PER""", """B-ORG""", """I-ORG""", """B-LOC""", """I-LOC"""]					)					),
	                    """langs""": Sequence(Value("""string"""					)					),
	                    """spans""": Sequence(Value("""string"""					)					),
	                }					)    ,      splits=[
	                {
	                    """name""": """train""",
	                    """num_bytes""": 2351563,
	                    """num_examples""": 10000,
	                },
	                {
	                    """name""": """validation""",
	                    """num_bytes""": 238418,
	                    """num_examples""": 1000,
	                },
	            ]    ,      download_size=3940680    ,      dataset_size=2589981    ,      )
	    }					)
	assert dataset_infos.keys() == expected_dataset_infos.keys()
	for key in DatasetInfo._INCLUDED_INFO_IN_YAML:
		A__   ,   A__							:    Optional[Any]        =		getattr(dataset_infos["""default"""]    ,      lowercase_					), getattr(expected_dataset_infos["""default"""]    ,      lowercase_					)
		if key == "num_bytes":
			assert is_apercent_close(lowercase_    ,      lowercase_					)
		elif key == "splits":
			assert list(lowercase_					) == list(lowercase_					)
			for split in result:
				assert result[split].name == expected[split].name
				assert result[split].num_examples == expected[split].num_examples
				assert is_apercent_close(result[split].num_bytes    ,      expected[split].num_bytes					)
		else:
			result == expected



