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

Home > Numbers
How many drinks do you need? (Posted on 2018-05-25) Difficulty: 3 of 5
ALCOHOL + ALCOHOL + ... + ALCOHOL = HANGOVER

How many drinks do you need?

Source: rec.puzzles

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 1
27 drinks, as

27 * 3451914 = 93201678
     ALCOHOL   HANGOVER

DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 Text1.Text = ""
 crlf = Chr(13) + Chr(10)
 '     hangoverlc
 s$ = "1234567890": hld$ = s
 Do
  If InStr(s, "0") > 2 Then
    hangover = Val(Left(s, 8))
    alcohol = 1000000 * Val(Mid(s, 2, 1)) + 100001 * Val(Mid(s, 9, 1)) + 10000 * Val(Mid(s, 10, 1)) + 1010 * Val(Mid(s, 5, 1)) + 100 * Val(Mid(s, 1, 1))
    For mult = 2 To 99
      If mult * alcohol = hangover Then
        Text1.Text = Text1.Text & mult & " * " & alcohol & " = " & hangover & crlf
      End If
    Next
  End If
  DoEvents
  permute s
 Loop Until s = hld
 
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub


  Posted by Charlie on 2018-05-25 16:03:52
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 (14)
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