#11
|
|||
|
|||
Re: another brain teaser for the math inclined
Hint: The problem becomes much easier if you don't leave out kid #2. I'm assuming kid #2 got lost in translation somewhere.
Answer in white: <font color="white"> Only perfect squares will be open, i.e 2, 4, 12, 16, 25, 36, 49, 64. If kid #2 was supposed to be left out, just take my answer and switch all the even doors.</font> Reasoning: <font color="white"> Only perfect squares have an odd number of factors </font> |
#12
|
|||
|
|||
Re: another brain teaser for the math inclined
okay, I'll try to piece it together. thank you for you help
|
#13
|
|||
|
|||
Re: another brain teaser for the math inclined
[ QUOTE ]
Hint: The problem becomes much easier if you don't leave out kid #2. I'm assuming kid #2 got lost in translation somewhere. Answer in white: <font color="white"> Only perfect squares will be open, i.e 2, 4, 12, 16, 25, 36, 49, 64. If kid #2 was supposed to be left out, just take my answer and switch all the even doors.</font> Reasoning: <font color="white"> Only perfect squares have an odd number of factors </font> [/ QUOTE ] I think you mistakenly put a couple of numbers in there and missed one! |
#14
|
|||
|
|||
Re: another brain teaser for the math inclined
[ QUOTE ]
I think you mistakenly put a couple of numbers in there and missed one! [/ QUOTE ] Actually, just in that list, he missed two, and yeah, put a couple other extra in. Still, the answer is correct in that only perfect squares will be open. <font color="white">1,4,9,16,25,36,49,64,81,...,961. </font> |
#15
|
|||
|
|||
Re: another brain teaser for the math inclined
[ QUOTE ]
[ QUOTE ] Hint: The problem becomes much easier if you don't leave out kid #2. I'm assuming kid #2 got lost in translation somewhere. Answer in white: <font color="white"> Only perfect squares will be open, i.e 2, 4, 12, 16, 25, 36, 49, 64. If kid #2 was supposed to be left out, just take my answer and switch all the even doors.</font> Reasoning: <font color="white"> Only perfect squares have an odd number of factors </font> [/ QUOTE ] I think you mistakenly put a couple of numbers in there and missed one! [/ QUOTE ] Yeah, I'm retarded. I have absolutely no recollection of what I was thinking or how those extra numbers got in there. I guess for some reason I though 3x3 = 12. Can you prove that it doesn't?! |
#16
|
|||
|
|||
Re: another brain teaser for the math inclined
yeah, I got it thanks
|
#17
|
|||
|
|||
Re: another brain teaser for the math inclined
<font class="small">Code:</font><hr /><pre> public static void main(String[] args) {
boolean[] lockers = new boolean[1000]; for (int person = 0; person < 1000; ++person) { // have each person flip every nth door for (int i = person; i < lockers.length; i += person + 1) lockers[i] = !lockers[i]; // flip door } // print some lockers for (int i = 0; i < lockers.length; ++i) System.out.print(lockers[i] + ","); } </pre><hr /> [ QUOTE ] true,false,false,true,false,false,false,false,true ,false,false,false,false,false,false,true,false,fa lse,false,false,false,false,false,false,true,false ,false,false,false,false,false,false,false,false,f alse,true,false,false,false,false,false,false,fals e,false,false,false,false,false,true,false,false,f alse,false,false,false,false,false,false,false,fal se,false,false,false,true,false,false,false,false, false,false,false,false,false,false,false,false,fa lse,false,false,false,true,false,false,false,false ,false,false,false,false,false,false,false,false,f alse,false,false,false,false,false,true,false,fals e,false,false,false,false,false,false,false,false, false,false,false,false,false,false,false,false,fa lse,false,true,false,false,false,false,false,false , ... [/ QUOTE ] |
|
|