albert391212
- 11
- 0
N | + | S(N) | = | 2000 | ||||
N is a 4-digit number,and S(N) is the sum of each digit of N given N+S(N)=2000 please find N |
N | + | S(N) | = | 2000 | ||||
N is a 4-digit number,and S(N) is the sum of each digit of N given N+S(N)=2000 please find N |
Let [math]N = ABCD \equiv A \times 10^3 + b \times 10^2 + C \times 10 + D[/math] So [math]N + S(N) = 1000A + 100B + 10C + (A + B + C + 2D) = 2000[/math].Albert391212 said:
N + S(N) = 2000 N is a 4-digit number,and S(N) is the sum of each digit of N
given N+S(N)=2000
please find N
Thanks for your answertopsquark said:Let [math]N = ABCD \equiv A \times 10^3 + b \times 10^2 + C \times 10 + D[/math] So [math]N + S(N) = 1000A + 100B + 10C + (A + B + C + 2D) = 2000[/math].
Note that A = 1. So
[math]N + S(N) = 100B + 10C + (B + C + 2D) = 999[/math]
Now start working through some cases. For example, B + C + 2D < 10 is impossible because it means B = C = 9, which is a contradiction. So [math]B + C + 2D \geq 10[/math]. Thus when adding we have to carry a 1 into the 10's place, which means that C is at most 8. etc. It will take a while.
-Dan