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

Home > Numbers
A primer in Malaga (Posted on 2018-04-19) Difficulty: 3 of 5
primer+rimer+imer+mer+er+r=malaga

There is only one valid solution for the above alphametic.

Find it.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2
primer     Malaga
652745     709030
652745     709030

Appears twice as the interchange of positions 6 and 10 don't matter as they are not used..
Position 6 is not used as initially a bug was that positions 1-6 were used for primer, 2-6 for rimer, etc.

DefDbl A-Z
Dim crlf$, dr


Private Sub Form_Load()
 Form1.Visible = True
 Text1.Text = ""
 crlf = Chr(13) + Chr(10)
 
 s$ = "0123456789": hld$ = s
 Do
  If InStr(s, "0") > 5 Then
   primer = Val(Mid(s, 1, 5) + Mid(s, 2, 1))
   rimer = Val(Mid(s, 2, 4) + Mid(s, 2, 1))
   imer = Val(Mid(s, 3, 3) + Mid(s, 2, 1))
   mer = Val(Mid(s, 4, 2) + Mid(s, 2, 1))
   er = Val(Mid(s, 5, 1) + Mid(s, 2, 1))
   r = Val(Mid(s, 2, 1))
   malaga = Val(Mid(s, 4, 1) + Mid(s, 7, 1) + Mid(s, 8, 1) + Mid(s, 7, 1) + Mid(s, 9, 1) + Mid(s, 7, 1))
   If primer + rimer + imer + mer + er + r = malaga Then
     Text1.Text = Text1.Text & primer & "     " & malaga & crlf
   End If
  End If
  DoEvents
  permute s
 Loop Until s = hld
 
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

  Posted by Charlie on 2018-04-19 14:52:49
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (11)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information