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

 Pandigital Ponder (Posted on 2014-08-13)
Each of P, Q and R are positive integers that together use the base ten digits 1 to 9 exactly once.

What are P, Q and R, given that P:Q:R = 3:7:8?

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solutions Comment 1 of 1
Could be either

213:497:568 or
321:749:856

DefDbl A-Z
Dim crlf\$, used(9)

ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf\$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents

n\$ = "123456789": hold\$ = n\$
Do
p = Val(Mid(n\$, 1, 3))
q = Val(Mid(n\$, 4, 3))
r = Val(Mid(n\$, 7, 3))
If 7 * p = 3 * q And 8 * q = 7 * r Then
Text1.Text = Text1.Text & Str(p) & Str(q) & Str(r) & crlf
DoEvents
End If
permute n\$
Loop Until n\$ = hold\$

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

 Posted by Charlie on 2014-08-13 15:50:53

 Search: Search body:
Forums (0)