Find the sum of all the two digit numbers which can be expressed as an integral multiple of the product of their digits.

Guest Dec 8, 2019

#1**+1 **

a=1;b=1;p=0; cycle:d=a*10+b;if(d%(a*b)==0, goto loop, goto next); loop:printd,", ",;p=p+n; next:b++;if(b<10, goto cycle, 0);b=1;a++;if(a<10, goto cycle, 0);print"Total = ",p

11 , 12 , 15 , 24 , 36 , Total = 98

Guest Dec 9, 2019

#2**+1 **

Find the sum of all the two digit numbers which can be expressed as an integral multiple of the product of their digits.

I did this by looking at the numbers. It is not as arduous as it looks

**10a+b=kab** where 1<= a <= 9 0<=b<=9 and k is a positive integer

**If a=1 then**

**10+b=1b * k**

b=0 no

b=1 k=11 yes **11**

b=2 k=6 yes **12**

b=3 no

b=4 14 is not a multiple of 4 so no

b=5 15 is a multple of 5 k= 3 **15**

b=6 16 is not a multiple of 6 so no

b=7 17 is not a multiple of 7 so no

b=8 18 is not a multiple of 8 so no

b=9 19 is not a multiple of 9 so no

Ok now I can see a bit of a pattern emerging. The original number must be a multiple of the last digit.

so when I look at a=2 I only need think about **even** 2 digit numbers

**10a+b=kab**

**If a=2 then**

**20+b= 2b * k**

b=2 no

b=4 24 is divisable by 2*4=8 good **24**

b=6 no, b=8 no

**10a+b=kab** a=3

30+b=3b * k

If a=3 I only need consider numbers that are multiples of 3 which are 33,36,39

divide by 3 and I get 11,12,13

these must also be multiples of by b

11/3 no, 12/6 yes 13/9 no

SO only **36 works here**

**10a+b=kab** a=4

40+b=4b * k

If a=4 I only need consider numbers that are multiples of 4 which are 44 and 48

divide by 4 and I get 11 and 12

these must also be multiples of by b

11/4 no 12/8 no

SO none of these work

**10a+b=kab** a=5

50+b=5b * k

only 55 is a multiple of 5

55/5=11 11 is not a multiple of 5 so no good

**10a+b=kab** a=6

66 does not work

nor will 77 or 88 or 99

**So the only ones that work are 11, 12, 15, 24 and 36.**

**Guest has already added them for you.**

Melody Dec 9, 2019