In this article we will write a program in Python to find if a given number is Disarium Number.I hope you you have pyhon installed in your machine to write this program. If it’s not installed, then you can follow below link for installation.

https://vidyabhandar.com/how-to-install-python-in-windows/

Before writing the program, we need to know What is a Disarium Number. By seeing/listening the word **Disarium **you might be thinking what is a Disarium Number. So let’s understand the Disarium Number.

**Disarium Number :** A number is called **Disarium **if the sum of its digits powered with their respective positions is equal to the number itself.

Is this definition is not easy to understand? Let’s take a Example so that it will be easy to understand. In range 1 to 200 there are 12 Disarium Number 1, 2, 3, 4, 5, 6, 7, 8, 9, 89, 135, 175. So let’s take example of 89 & 135 as below.

Example 1 | Example 2 | Example 3 |

Number: 898^{1}+ 9^{2} = 8+ 81 = 89You can see 8 ^{1}+ 9^{2}= 89 .So 89 is a Disarium Number. | Number: 1351 ^{1}+ 3^{2}+ 5^{3} = 1+ 9 +125 = 135You can see . = 1351^{1}+ 3^{2}+ 5^{3}So 135 is a Disarium Number. | Number: 1751^{1}+ 7^{2}+ 5^{3} = 1+ 49 +125 = 175You can see 1 . ^{1}+ 7^{2}+ 5^{3} = 175So 175 is a Disarium Number. |

I think you understood the Disarium number . So let’s write the program.

```
#program to find if a given number is Disarium.
number = int(input("Enter a number "))
rem = s = 0;
len = len(str(number))
x = number;
#The sum of digits powered with their respective position
while(number > 0):
rem = number%10;
s += int(rem**len);
number = number//10;
len -= 1;
#to check if the sum is equal to the number
if(s == x):
print("Disarium number");
else:
print("Not a Disarium number");
```

Output:

Please write your valuable comments in the comment section if you find anything incorrect, or you want to share more information about this article..