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

 Straight or rotated (Posted on 2017-08-10)
```ABC + DEF = GHI
GDA + HEB = IFC```

There are two sets of simultaneous solutions for the above 2 alphametics,
one being a 90o rotation of the other.

Find both.

Comments: ( Back to comment list | You must be logged in to post comments.)
 program and solution (spoilers) | Comment 1 of 3
The program below prints GHI first and ABC last so that GDA, etc. read correctly downward.

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

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

s\$ = "1234567890": h\$ = s
Do
abc = Val(Mid(s, 1, 3))
def = Val(Mid(s, 4, 3))
ghi = Val(Mid(s, 7, 3))
gda = 100 * Val(Mid(s, 7, 1)) + 10 * Val(Mid(s, 4, 1)) + Val(Mid(s, 1, 1))
heb = 100 * Val(Mid(s, 8, 1)) + 10 * Val(Mid(s, 5, 1)) + Val(Mid(s, 2, 1))
ifc = 100 * Val(Mid(s, 9, 1)) + 10 * Val(Mid(s, 6, 1)) + Val(Mid(s, 3, 1))
If abc + def = ghi Then
If gda + heb = ifc Then
If abc > 100 And def > 100 And gda > 100 And heb > 100 Then
Text1.Text = Text1.Text & ghi & crlf & def & crlf & abc & crlf & crlf
End If
End If
End If
permute s
DoEvents
Loop Until s = h

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

End Sub

produces

`639157482`
`729146583`

Annotated:

`639 ghi157 def482 abc`
`729 ghi146 def583 abc`

They do not seem to be rotations of each other, although digits that shared a column now share a row and vice versa.

 Posted by Charlie on 2017-08-10 11:16:22

 Search: Search body:
Forums (0)
Random Problem
Site Statistics
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox: