What is a Disarium Number?

What is a Disarium Number?

A disarium number is a number in which the sum of the digits to the power of their respective position is equal to the number itself (position is counted from left to right starting from 1).

Example of a Disarium number is 175,
1¹ + 7² + 5³ = 1 + 49 + 125= 175
Hence,175 is a disarium number.

Our approach will be straightforward. We will break the number into digits and then power it with their respective position and then add it to check if the obtained sum equals the given number.

Psuedo Code f...
 •  0 comments  •  flag
Share on Twitter
Published on February 07, 2021 10:59
No comments have been added yet.