

def 							UpperCAmelCase_  (		_A							):





     '''simple docstring'''




     return 1 if digit in (0, 1) else (digit * factorial(digit - 1							))
def 							UpperCAmelCase_  (		_A							):





     '''simple docstring'''




     SCREAMING_SNAKE_CASE__       =       0
     SCREAMING_SNAKE_CASE__       =       number
     while duplicate > 0:
          SCREAMING_SNAKE_CASE__       =       divmod(lowercase_ ,						10							)
          fact_sum += factorial(lowercase_							)
     return fact_sum == number


if __name__ == "__main__":
       print('''Program to check whether a number is a Krisnamurthy Number or not.''')
       _SCREAMING_SNAKE_CASE	:    Optional[Any]       =     int(input('''Enter number: ''').strip())
       print(
           F"{number} is {'' if krishnamurthy(number) else 'not '}a Krishnamurthy Number."
       )






import unittest

from knapsack import greedy_knapsack as kp




class 							lowerCamelCase   (  unittest.TestCase ):


	def  A(    self):
							__UpperCAmelCase			:							Optional[Any]	    =	[1_0, 2_0, 3_0, 4_0, 5_0, 6_0]
							__UpperCAmelCase			:							str	    =	[2, 4, 6, 8, 1_0, 1_2]
							__UpperCAmelCase			:							List[Any]	    =	1_0_0
							self.assertEqual(kp.calc_profit(lowercase__				,     lowercase__				,     lowercase__)				,     2_1_0)


	def  A(    self):
							self.assertRaisesRegex(lowercase__				,     '''max_weight must greater than zero.''')


	def  A(    self):
							self.assertRaisesRegex(lowercase__				,     '''Weight can not be negative.''')


	def  A(    self):
							self.assertRaisesRegex(lowercase__				,     '''Profit can not be negative.''')


	def  A(    self):
							self.assertRaisesRegex(lowercase__				,     '''max_weight must greater than zero.''')


	def  A(    self):
							self.assertRaisesRegex(
							    lowercase__				,     '''The length of profit and weight must be same.''')


if __name__ == "__main__":
				unittest.main()

