Jack Mustacato f8a05c146f armstrong-numbers: add reference to tutorial (#1470) | 6 lat temu | |
---|---|---|
.. | ||
.meta | 6 lat temu | |
src | 6 lat temu | |
README.md | 6 lat temu | |
build.gradle | 6 lat temu |
An Armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits.
For example:
9 = 9^1 = 9
10 != 1^2 + 0^2 = 1
153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190
Write some code to determine whether a number is an Armstrong number.
For more help on how to solve this exercise, please refer to the tutorial provided as part of the hello world exercise: TUTORIAL.md
You can run all the tests for an exercise by entering
$ gradle test
in your terminal.
Wikipedia https://en.wikipedia.org/wiki/Narcissistic_number
It's possible to submit an incomplete solution so you can see how others have completed the exercise.