Smallest integer
What is the smallest integer greater than 0 that can be written entirely with 0s and 1s and is exactly divisible by 225?
This one's fairly easy.
This one's fairly easy.
Labels: mathschallenge
A Trick Question Every Day
Labels: mathschallenge
18 Comments:
11100001
NOOOOO!
It obviously can't end in a one.
PQ
NOOOOO!
It obviously can't end in a one.
PQ
225 * 49382716 = 11111111100
Another 10 minute wonder. Ragknot got it. Dare I ask how you did it, Ragknot? :)
How? Keep adding 125 to previous total until I had nothing but ones and zeros.
No, not really, just multiplied 123456789 times 4 since 4* 225 = 900
just noticed, the first post is 225 in binary
Using Binary? Wow that is great. Any number would be 1's and 0's!!!
a true trick of mind
I think I am wrong.
11100001 is a better answer
I should have said "in decimal notation". Never mind, as long as you're enjoying yourselves.
The "official" way to do it is to notice that 225 = 9*25. So the number must end with 00, 25, 50 or 75 - obviously only 00 is acceptable. The real trick is to remember that if a number is divisible by 9, then so is the sum of its digits, so it must begin with 9 1s.
This is Agrajag.
It was my answer, first post.
I got so depressed trying to get my blogger account to work that I just put in the answer, hoping to beat all the people who can do maths.
I know that Chris didn't intend a binary answer because the puzzle label only had "mathschallenge" making us not think outside the box.
PS Am I the only one having blogger problems.
Hi Agrajag. I just had to do another post to get my last one through. At least on your own blog you can completely remove a post. I've had to go through hoops sometimes to get a new blog up or a new post through. It's been happening on and off for a couple of months.
An annoying thing is, that the posts do appear in the comment window (where you write a post).
I nearly put up the label trickofmind because of the official solution, but decided the problem didn't make the grade.
Hi again Agrajag, I was mean, I shouuld have complemented you for doing it in binary. Consider that as done.
Sorry, my mind is elsewhere as I've trying to fix a couple of computers. Ragknot, I've just re-read your 12:43 post. LOL should cover it, thanks.
I also quite liked the Anonymous post which went NOOOOO! I probably shouldn't encourage that sort of thing, but it made me laugh. Far better than the retard response of "you idiot" (always from a major idiot).
Chris,
Did you buy the 123456789 * 4?
That was cute, I knew that the answer had to end with 00, and that it would be a multiple of 900
(4*225) but clearly the most simple, straight forward path I saw was this, and it only took a minute.
Sub test()
Const k = 225
Dim r, c As Long
Debug.Print Now()
agn:
r = r + k
c = c + 1
If Left(r, 1) <> "1" Then GoTo nxt
If InStr(1, r, "2") Then GoTo nxt
If InStr(1, r, "3") Then GoTo nxt
If InStr(1, r, "4") Then GoTo nxt
If InStr(1, r, "5") Then GoTo nxt
If InStr(1, r, "6") Then GoTo nxt
If InStr(1, r, "7") Then GoTo nxt
If InStr(1, r, "8") Then GoTo nxt
If InStr(1, r, "9") Then GoTo nxt
Debug.Print c, r
Debug.Print Now()
End
nxt:
GoTo agn
End Sub
Result:
9/20/2009 7:14:05 PM
49382716 11111111100
9/20/2009 7:15:02 PM
1000
Previous Anonymous, how is it 1000? I think you're thinking about 250 instead of 225.
Hi Ragknot, you took me in for a few seconds - maybe it was just the shock of seeing something so crazy.
Thanks for your code. Nearly 50 million loops executed. If you did that by hand, 1 loop/sec (24/7), it would take nearly 19 months - aren't computers wonderful! Greetz.
Post a Comment
Links to this post:
Create a Link
<< Home