Find a six-digit number
ABCDEF such that
AB3+CD3+EF3=ABCDEF.
Rem: VWXYZ denotes the value of the string (not necessarily distinct digits).
Seven solutions:
165033
221859
341067
444664
487215
982827
983221
from
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr(13) + Chr(10)
For ab = 10 To 99
t1 = ab * ab * ab
p1 = ab * 10000
For cd = 10 To 99
t2 = cd * cd * cd + t1
p2 = cd * 100 + p1
For ef = 10 To 99
t3 = ef * ef * ef + t2
p3 = p2 + ef
ct = ct + 1
If t3 = p3 Then
Text1.Text = Text1.Text & t3 & crlf
End If
Next
Next
Next
Text1.Text = Text1.Text & crlf & ct & " done"
End Sub
|
Posted by Charlie
on 2018-06-12 16:08:02 |