I added two three-digit numbers a and b, where the six digits I
used to write a and b were all different. a + b was another three-digit number.
I added the digits in a and b to obtain another number n.
What can you say about n?
(In reply to
re: computer solution--I think what's wanted by Steve Herman)
Steve H's range is correct.
lord@rabbit resolve % s
11 12 13 14 15 16 17 18 19 20
0 0 0 0 480 432 816 1104 1776 1984
21 22 23 24 25 26 27 28 29 30
2984 2952 3656 3792 4008 3816 4224 3240 3048 2448
31 32 33 34 35 36 37 38 39 40
2104 1512 1192 704 432 336 144 48 0 0
lord@rabbit resolve % more s.f
program ss
implicit none
integer bol,eol,i,j,l,k1,k2,k3,k4,k5,k6,sumnums,sumdigs,taken(40)
data taken/40*0/
do 101 k1=1,9
do 202 k2=0,9
if(k1.eq.k2)go to 202
do 303 k3=0,9
if(k1.eq.k3.or.k2.eq.k3)go to 303
do 404 k4=1,9
if(k1.eq.k4.or.k2.eq.k4.or.k3.eq.k4)go to 404
do 505 k5=0,9
if(k1.eq.k5.or.k2.eq.k5.or.k3.eq.k5.or.
1 k4.eq.k5)go to 505
do 606 k6=0,9
if(k1.eq.k6.or.k2.eq.k6.or.k3.eq.k6.or.
1 k4.eq.k6.or.k5.eq.k6)go to 606
sumnums=k3+k6+(k2+k5)*10+(k1+k4)*100
if(sumnums.gt.999)go to 606
sumdigs=k1+k2+k3+k4+k5+k6
taken(sumdigs)=taken(sumdigs)+1
606 enddo
505 enddo
404 enddo
303 enddo
202 enddo
101 enddo
do i=1,3
bol=i*10+1
eol=bol+9
print 7,(j,j=bol,eol),(taken(l),l=bol,eol)
7 format(10(4x,i2,x),/,10(i6,x),/)
enddo
end
lord@rabbit resolve %
Edited on August 22, 2021, 12:55 pm