All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Three conditions define a triplet (Posted on 2015-01-14)
Let N denote an integer number such that:

I. N is a 3-digit number abc.
ii. a,b,c are distinct non-zero decimal digits.
iii. The product a*b*c divides N.

List all possible values for (a,b,c) complying with the above conditions.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 2 of 2 |
For n = 100 To 999
s\$ = LTrim(Str(n))
prod = 1: good = 1
For i = 1 To Len(s\$)
prod = prod * Val(Mid(s\$, i, 1))
If InStr(s\$, Mid(s\$, i, 1)) <> i Or prod = 0 Then
good = 0
Exit For
End If
Next
If good Then
ct = ct + 1
If n Mod prod = 0 Then
Text1.Text = Text1.Text & n & Str(prod) & crlf
goodct = goodct + 1
End If
End If
Next

`N   product of digits128 16132 6135 15175 35216 12312 6315 15384 96432 24612 12624 48672 84735 105816 48`

 Posted by Charlie on 2015-01-14 22:24:18

 Search: Search body:
Forums (0)