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

 Letters to digits to letters (Posted on 2017-06-22)
Solve the alphametic:

THIS*IS=HANDY

It was 205 42 8439 543K, was it?

 See The Solution Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 1 of 1
DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

s\$ = "0123456789": h\$ = s
Do
If Mid(s, 9, 1) < Mid(s, 10, 1) Then
handy = Val(Left(s, 5))
isVal = Val(Mid(s, 6, 2))
this = 1000 * Val(Mid(s, 8, 1)) + 100 * Val(Left(s, 1)) + isVal
If this * isVal = handy Then
Text1.Text = Text1.Text & this & Str(isVal) & Str(handy) & crlf
End If
End If
permute s
DoEvents
Loop Until s = h

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

End Sub

finds

`194 94 18236389 89 346219304 4 37216487 87 42369489 89 435215713 13 74269`

where the too-short words represent numbers with leading zeros.

The only solution without leading zeros is:

`THIS IS HANDY5713 13 74269`

making the saying:

It was not an easy task, was it?

under the assumption that zero is O and 8 is E.

 Posted by Charlie on 2017-06-22 10:34:01

 Search: Search body:
Forums (2)