Mình nghĩ là cách tư duy của bạn đúng nhưng mà, đây là cách giải lô-gíc hơn của mình:
Lời giải bài 2:
Gọi số cần tìm là [tex] \overline{abc}[/tex]. ĐK: b, c thuộc N; a thuộc N*; a, b, c\leq9
Theo bài ra ta có: [tex] \overline{abc}[/tex] = a! + b! + c!
Do [tex] \overline{abc}[/tex] < 1000 \Rightarrow [tex] \overline{abc}[/tex] \leq 6! \Rightarrow a, b, c \leq 6 \Rightarrow [tex] \overline{abc}[/tex] \leq 666
\Rightarrow a! + b! + c! \leq 666 \Rightarrow a!, b!, c! \leq 5! \Rightarrow a, b, c \leq 5
Nếu a= b= c= 4 \Rightarrow [tex] \overline{abc}[/tex] = a! + b! + c! = 4! + 4! + 4! = 72 (Vô lý)
\Rightarrow Trong 3 số a, b, c \exists ít nhất 1 số = 5.
- Nếu a=5 \Rightarrow [tex] \overline{5bc}[/tex] 5! + b! + c! \leq 5! + 5! + 5! = 360
\Rightarrow [tex] \overline{5bc}[/tex] \leq 360 (Vô Lý)
- Nếu b=5 \Rightarrow [tex] \overline{a5c}[/tex] = a! + 5! + c!
\Rightarrow 100a + 50 + c = a! + 5! + c! \Rightarrow 100a + c = 70 + a! + c! \leq 70 + 5! + 5! = 310 \Rightarrow a \leq 3
\Rightarrow 100a + c = 70 + a! + c! \leq 70 + 3! + 5! = 196 \Rightarrow a\leq1
\Rightarrow a=1 ( do a>0 )
Do c \leq 5 \Rightarrow c = 0; 1; 2; 3; 4; 5
+ Với c=0 ta có số [tex] \overline{abc}[/tex] = 150 ( Không TM )
+ c=1 ta có số [tex] \overline{abc}[/tex] = 151 ( Không TM )
+ c=2 ta có số [tex] \overline{abc}[/tex] = 152 ( Không TM )
+ c=3 ta có số [tex] \overline{abc}[/tex] = 153 ( Không TM )
+ c=4 ta có số [tex] \overline{abc}[/tex] = 154 ( Không TM )
+ c=5 ta có số [tex] \overline{abc}[/tex] = 155 ( Không TM )
- Nếu c=5 \Rightarrow [tex] \overline{ab5}[/tex] = a! + b! + 5! \leq 5! + 5! + 5! = 360
\Rightarrow [tex] \overline{ab5}[/tex] \leq360 \Rightarrow a\leq3 \Rightarrow a=1, 2, 3
+ Với a=3 \Rightarrow [tex] \overline{3b5}[/tex] = 3! + b! + 5! \leq 3! + 5! + 5! = 246
\Rightarrow [tex] \overline{3b5}[/tex] \leq 246 ( Vô lý )
+ Với a=2 \Rightarrow [tex] \overline{2b5}[/tex] = 2! + b! + 5! \leq 2! + 5! + 5! = 242
\Rightarrow [tex] \overline{2b5}[/tex] \leq242 \Rightarrow b\leq3
\Rightarrow [tex] \overline{2b5}[/tex] \leq 2! + 3! + 5! = 128 (Vô lý)
+ Nếu a=1 \Rightarrow [tex] \overline{1b5}[/tex] = 1! + b! + 5!
\Rightarrow 105 + 10b = 121 + b! \Rightarrow 10b = 15 + b! Mà b \leq 5
\Rightarrow 10b = 15 + b! \leq 50 ( Vì 10.5=50) \Rightarrow 15 + b! \leq 50 \Rightarrow b! \leq 35 \Rightarrow b \leq 4 \Rightarrow b = 0, 1, 2, 3 ,4
○ b = 0 ta có số [tex] \overline{abc}[/tex] = 105 ( Không TM )
○ b = 1 ta có số [tex] \overline{abc}[/tex] = 115 ( Không TM )
○ b = 2 ta có số [tex] \overline{abc}[/tex] = 125 ( Không TM )
○ b = 3 ta có số [tex] \overline{abc}[/tex] = 135 ( Không TM )
○ b = 4 ta có số [tex] \overline{abc}[/tex] = 145 ( TM )
Vậy số cần tìm là [tex] \overline{abc}[/tex] = 145
( Bài hơi dài , k biết có cách nào làm ngắn hơn k )