code-challenges

Narcissistic number

A narcissistic number is a number where the sum of each digit, each raised to the power of the number of digits given, equals the number. We will focus on base 10 in this exercise. Some examples:

1^1 = 1

3^3 + 7^3 + 1^3 = 371

Write a solution in a programming language of your choice which returns a boolean value representing if the input is a narcissistic number or not. Write the code in a style that you would have shipped to production in form of readability and maintainability.