# Find the previous Armstrong number

Problem to find the previous Armstrong number in given number.

If given number equal to the power of each and every digit with length of the given number and sum the powered value.That is called Armstrong number.Armstrong number full Explain

## Example-1:

Input : n = 15 Output : 9

## Example-2:

Input : n = 160 Output : 153

# Solution

## Output

9