Given a number n, return the smallest Strong number greater than n.
of
Strong number is a number whose sum of all digits' factorial is equal to the number 'n'.
Factorial implies when we find the product of all the numbers below that number including that
number and is denoted by ! (Exclamation sign), For example: 4! = 4x3x2x1 = 24.
on
So, to find a number whether its strong number, we have to pick every digit of the number like
the number is 145 then we have to pick 1, 4 and 5 now we will find factorial of each number i.e,
1! = 1, 4! = 24, 5! = 120.
Now we will sum up 1 + 24 + 120 so we get 145, that is exactly same as the input given, So we
can say that the number is strong number.
Answers
Answered by
0
Answer:
- ABCDEFG HIJKL MNOP QRST UVW XYZ
Similar questions