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

 13 and 2 (Posted on 2016-03-01)
Divide the set of integers from 1 to 15 into 2 subsets - a subset A of 13 numbers and B of 2 numbers so that the sum of the members of A equals the product of the two numbers in B.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: answer | Comment 4 of 6 |

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

For a = 1 To 14
For b = a + 1 To 15
For c = b + 1 To 15
prod = a * b * c
tot = 120 - a - b - c
If prod = tot Then
Text1.Text = Text1.Text & a & Str(b) & Str(c) & crlf
End If
Next
Next
Next

Text1.Text = Text1.Text & crlf & " done"

End Sub

finds 3 solutions to the 12 and 3 version of this puzzle:

1 7 14
1 9 11
3 5 7

as the three (out of 15) numbers to be multiplied.

 Posted by Charlie on 2016-03-01 09:20:29

 Search: Search body:
Forums (0)