A square root of
BIKINI is a domestic animal.
a.What English words fit the above definition?
b. What can be said about a generic (basic) solution?
DefDbl A-Z
Dim crlf$, used(25)
Private Sub Form_Load()
ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
For b = 1 To 9
used(b) = 1
For i = 0 To 9
If used(i) = 0 Then
used(i) = 1
For k = 0 To 9
If used(k) = 0 Then
used(k) = 1
For n = 0 To 9
If used(n) = 0 Then
used(n) = 1
bikini = 100000 * b + 10101 * i + 1000 * k + 10 * n
sr = Int(Sqr(bikini) + 0.5)
If sr * sr = bikini Then
Text1.Text = Text1.Text & sr & Str(bikini) & crlf
DoEvents
End If
used(n) = 0
End If
Next n
used(k) = 0
End If
Next k
used(i) = 0
End If
Next i
used(b) = 1
Next b
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds only
437 190969
so BIKINI = 190969 and its square root is 437.
So the domestic animal could be any animal with a 3-letter name where all three letters are different and none is found within BIKINI.
CAT and DOG are the obvious choices to fill the bill. While COW is domesticated, I don't think it would be called domestic. RATs are found domestically (around the house) in some circumstances; some are kept as pets.
|
Posted by Charlie
on 2014-09-26 10:30:55 |