#K85202. Sum of Factorial Digits
Sum of Factorial Digits
Sum of Factorial Digits
Given two integers a and b, find all numbers n in the range \([a, b]\) (inclusive) that satisfy the equation
\( n = \sum_{d \in D(n)} d! \)
where \(D(n)\) represents the set of digits in n and \(d!\) denotes the factorial of digit \(d\). Remember that by definition, \(0! = 1\). If no number in the given range satisfies the condition, output an empty line.
inputFormat
The input consists of a single line with two integers a and b separated by a space (1 ≤ a ≤ b).
outputFormat
Print all numbers that satisfy the condition in a single line, separated by a single space. If there are no such numbers, output an empty line.
## sample1 9
1 2
</p>