M is a perfect square whose 2nd and 3rd digits are 20 and the last two digits are 16.
Find the three smallest values of M.
M square root
1201216 1096
22052416 4696
92083216 9596
120912016 10996
220403716 14846
220641316 14854
320266816 17896
320553216 17904
420086016 20496
420414016 20504
520022416 22804
620209216 24904
720707716 26846
820593316 28646
920879716 30346
from
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For a = 1 To 99999
DoEvents
astr$ = LTrim(Str(a))
bstr$ = Left(astr, 1) + "20" + Mid(astr, 2) + "16"
b = Val(bstr)
sr = Int(Sqr(b) + 0.5)
If sr * sr = b Then
Text1.Text = Text1.Text & b & " " & sr & crlf
End If
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2016-04-07 15:40:15 |