• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
June 07, 2022 |2.0K Views

Krishnamurthy Numbers

Description
Discussion

A Krishnamurthy number is a number whose sum of the factorial of digits is equal to the number itself. For example 145, sum of factorial of each digits: 1! + 4! + 5! = 1 + 24 + 120 = 145 Examples: Input : 145 Output : YES Explanation: 1! + 4! + 5! = 1 + 24 + 120 = 145, which is equal to input, hence YES. Krishnamurthy Numbers: https://www.geeksforgeeks.org/check-if-a-number-is-a-krishnamurthy-number-or-not-2/