153. a) Find all three-digit numbers that are equal to the sum of the factorials of their digits.

b) Find all integers that are equal to the sum of the squares of their digits.
153. a) Let the hundreds, tens, and units digits of the desired number \( N \) be denoted by \( x, y \), and \( z \), respectively, so that \( N = 100x + 10y + z \). In this case, the condition of the problem gives

\[
100x + 10y + z = x! + y! + z!
\]

Note that \( 7! = 5040 \) is a four-digit number; therefore, no digit of the number \( N \) can exceed 6. Consequently, the number \( N \) itself does not exceed 700, from which it follows that no digit of \( N \) can exceed 5 (since \( 6! = 720 > 700 \)). At least one digit of the number \( N \) is 5, because even \( 3 \cdot 4! = 72 < 100 \), and \( N \) is a three-digit number. The digit \( x \) cannot be 5, since even \( 3 \cdot 5! = 360 < 500 \). It follows from this that \( x \) does not exceed 3. Furthermore, we can assert that \( x \) does not exceed 2, since even \( 3! + 2 \cdot 5! = 246 < 300 \). But the number 255 does not satisfy the condition of the problem, and if only one digit of the desired number is 5, then \( x \) cannot be greater than 1, because even \( 2! + 5! + 4! = 146 < 200 \). Moreover, since \( 1! + 5! + 4! = 145 < 150 \), we conclude that \( y \) cannot exceed 4; therefore, \( z = 5 \), since at least one digit of the number \( N \) must be 5. Thus, we have \( x = 1 \), \( 4 \geqslant y \geqslant 0 \), and \( z = 5 \); this allows us to easily find the only solution to the problem: \( N = 145 \).

b) The desired number \( N \) cannot have more than three digits, since even \( 4 \cdot 9^2 = 324 \) is a three-digit number. Therefore, we can write \( N = 100x + 10y + z \), where \( x, y, z \) are the digits of the number; here, \( x \) or even \( x \) and \( y \) simultaneously can be zero.

From the condition of the problem, we have \( 100x + 10y + z = x^2 + y^2 + z^2 \), from which

\[
(100 - x)x + (10 - y)y = z(z - 1)
\]

From the last equation, it follows first of all that \( x = 0 \), otherwise the number on the left side of the equation is not less than \( 90 \) (since \( x \geqslant 1 \), \( 100 - x \geqslant 90 \), \( (10 - y)y \geqslant 0 \)), and the number on the right side is not more than \( 9 \cdot 8 = 72 \) (since \( z \leqslant 9 \)). Therefore, the equation (") has the form \( (10 - y)y = z(z - 1) \). It is easy to check that this last equation is not satisfied for any positive integers \( x \) and \( y \) not exceeding 9, unless \( y \neq 0 \). If \( y = 0 \), then we have the only obvious solution \( z = 1 \).

Thus, the condition of the problem is satisfied by the only number \( N = 1 \).