


'''simple docstring'''






import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


__UpperCAmelCase					       =							logging.getLogger()




@unittest.skip("Temporarily disable the doc tests."						)
@require_torch
@require_tf
@slow
class 	a__       (							unittest.TestCase						):





							'''simple docstring'''






							def 						__SCREAMING_SNAKE_CASE							(	self      ,					lowerCamelCase_      ,					lowerCamelCase_ = None      ,					lowerCamelCase_ = None      ,					lowerCamelCase_ = None      ,					lowerCamelCase_ = True      ,					) ->							Any:
														lowerCAmelCase__      =			[file for file in os.listdir(_a     ) if os.path.isfile(os.path.join(_a      ,					_a     )     )]

														if identifier is not None:
																					lowerCAmelCase__      =			[file for file in files if identifier in file]

														if n_identifier is not None:
																					if isinstance(_a      ,					_a     ):
																												for n_ in n_identifier:
																																			lowerCAmelCase__      =			[file for file in files if n_ not in file]
																					else:
																												lowerCAmelCase__      =			[file for file in files if n_identifier not in file]

														lowerCAmelCase__      =			ignore_files or []
														ignore_files.append('''__init__.py'''     )
														lowerCAmelCase__      =			[file for file in files if file not in ignore_files]

														for file in files:
																					# Open all files
																					print('''Testing'''      ,					_a     )

																					if only_modules:
																												lowerCAmelCase__      =			file.split('''.'''     )[0]
																												try:
																																			lowerCAmelCase__      =			getattr(_a      ,					_a     )
																																			lowerCAmelCase__      =			doctest.DocTestSuite(_a     )
																																			lowerCAmelCase__      =			unittest.TextTestRunner().run(_a     )
																																			self.assertIs(len(result.failures     )      ,					0     )
																												except AttributeError:
																																			logger.info(F"""{module_identifier} is not a module."""     )
																					else:
																												lowerCAmelCase__      =			doctest.testfile(str('''..''' / directory / file     )      ,					optionflags=doctest.ELLIPSIS     )
																												self.assertIs(result.failed      ,					0     )







							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							Optional[int]:
														lowerCAmelCase__      =			Path('''src/transformers'''     )
														lowerCAmelCase__      =			"""modeling"""
														lowerCAmelCase__      =			[
														    """modeling_ctrl.py""",
														    """modeling_tf_ctrl.py""",
														]
														self.analyze_directory(_a      ,					identifier=_a      ,					ignore_files=_a     )







							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							int:
														lowerCAmelCase__      =			Path('''src/transformers'''     )
														lowerCAmelCase__      =			"""tokenization"""
														self.analyze_directory(_a      ,					identifier=_a     )







							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							Optional[int]:
														lowerCAmelCase__      =			Path('''src/transformers'''     )
														lowerCAmelCase__      =			"""configuration"""
														self.analyze_directory(_a      ,					identifier=_a     )







							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							List[str]:
														lowerCAmelCase__      =			Path('''src/transformers'''     )
														lowerCAmelCase__      =			["""configuration""", """modeling""", """tokenization"""]
														self.analyze_directory(_a      ,					n_identifier=_a     )







							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							int:
														lowerCAmelCase__      =			Path('''docs/source'''     )
														lowerCAmelCase__      =			["""favicon.ico"""]
														self.analyze_directory(_a      ,					ignore_files=_a      ,					only_modules=_a     )



'''simple docstring'''






def       _snake_case     (  A )		->					int:
							return 1 if digit in (0, 1) else (digit * factorial(digit - 1 ))


def       _snake_case     (  A )		->					bool:
							lowerCAmelCase__      =			0
							lowerCAmelCase__      =			number
							while duplicate > 0:
														lowerCAmelCase__     ,      lowerCAmelCase__      =			divmod(A				,					10 )
														fact_sum += factorial(A )
							return fact_sum == number


if __name__ == "__main__":
		print('''Program to check whether a number is a Krisnamurthy Number or not.''')
		__UpperCAmelCase					       =							int(input('''Enter number: ''').strip())
		print(
		    f"""{number} is {'' if krishnamurthy(number) else 'not '}a Krishnamurthy Number."""
		)