If
i.
ASK=(A+S+K)^{3} &
ii. SOLVE=(S+O+L+V+E)^{3} Show that:
i. has one integer solution
and
ii. has several, but only one with 5 distinct digits.
List all of them.
All such numbers, without regard to length, are:
The 3digit one solves part i, and the last one solves part ii.
For n = 1 To 999999
ns$ = LTrim(Str(n))
s = sod(ns)
If s * s * s = n Then
Text1.Text = Text1.Text & n & crlf
End If
DoEvents
Next
. . .
Function sod(x$)
t = 0
For i = 1 To Len(x)
t = t + Val(Mid(x, i, 1))
Next
sod = t
End Function

Posted by Charlie
on 20200817 14:43:53 