I + AM + VERY = SICK
Solve the above - distinct letters are replaced by distinct digits, all digits are used.
Find the lowest and the highest values of SICK .
Private Sub Form_Load()
crlf = Chr(13) + Chr(10)
Form1.Visible = True
mn = 999999
s$ = "0123456789": h$ = s
Do
i = Mid(s, 8, 1)
am = Mid(s, 1, 2)
very = Mid(s, 3, 4)
sick = Mid(s, 7, 4)
If i + am + very = sick Then
Text1.Text = Text1.Text & i & Str(am) & Str(very) & Str(sick) & crlf
If sick >= mx Then mx = sick
If sick <= mn Then mn = sick
End If
permute s
DoEvents
Loop Until s = h
Text1.Text = Text1.Text & crlf & mn & Str(mx)
End Sub
doesn't find any solutions
|
Posted by Charlie
on 2019-07-11 13:41:46 |