Abe challenges Bee to determine a
3-digit positive integer N.
It is known that the
number formed by the last two digits of N when divided by 9, yields a remainder of 3.
Abe makes the following statements, precisely one of which is false:
- N divided separately by each of 2, 4, 6, and 8 yields a remainder of 1.
- N divided separately by each of 5 and 7 yields a remainder of 2.
- N divided separately by each of 5 and 11 yields a remainder of 3.
Determine the value of N from the above statements and given clues.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For last2 = 3 To 100 Step 9
For first1 = 1 To 9
n = 100 * first1 + last2
If n Mod 8 = 1 And n Mod 6 = 1 Then numtrue = 1 Else numtrue = 0
If n Mod 5 = 2 And n Mod 7 = 2 Then numtrue = numtrue + 1
If n Mod 5 = 3 And n Mod 11 = 3 Then numtrue = numtrue + 1
If numtrue = 2 Then Text1.Text = Text1.Text & n & crlf
Next
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds
457
|
Posted by Charlie
on 2016-02-16 11:59:08 |