BOY*GIRL=POETRY
To each one of the ten distinct letters a corresponding digit should be allocated, making the above equation true.
Please find the 1 to 1 matching.
The desired values for
BOY GIRL POETRY are
265 1739 460835 respectively.
If B were allowed to be zero (leading zero), you'd have
083 9461 785263
085 9231 784635
s$ = "0123456789": h$ = s
Do
boy = Val(Left(s, 3))
girl = Val(Mid(s, 4, 4))
poetry = 100000 * Val(Mid(s, 8, 1)) + 10000 * Val(Mid(s, 2, 1)) + 100 * Val(Mid(s, 9)) + 10 * Val(Mid(s, 6, 1)) + Val(Mid(s, 3, 1))
If boy * girl = poetry Then
Text1.Text = Text1.Text & boy & Str(girl) & Str(poetry) & crlf
End If
DoEvents
permute s
Loop Until s = h
|
Posted by Charlie
on 2019-12-18 12:34:41 |