Iggy Posted September 27, 2003 Posted September 27, 2003 there are 1000 lockers and 1000 people, the 1st person opens ever locker, the second person changes every other locker (2,4,6, was (if it was open it is now closed), the 3rd person changes every 3rd locker, and the 4th person changes every 4th locker, and so on to all 1000 pll do it.how many fucking lockers are open at the end???????? (i kno teh answer just to tell u this is a 6th grade math question) this is just to stump ppl EDIT: another example, if its the 31st person hed change every 31st locker which is locker 31,62,and 93) -=VCP Forever=- | Official B.L.A.S.T.Addict
#ImVision# Posted September 27, 2003 Posted September 27, 2003 Goddammitt!! I know this question - i remember it from when i was in yr 7, but i cant remeber the answer!!!!
True Posted September 27, 2003 Posted September 27, 2003 I am bored and should be going to sleep in the morning, so i'll write a script that'll calculate it out in a sec... *** <?php /* 1000 lockers, 1000 people. 1st opens all lockers, 2nd opens 2,4,6, 3rd 3,6,9 etc until 1000 people open lockers. how many have been opened? */ $i = 1; while ($i != 1001) { $a = $a + $i; if ($a < 1001) { ++$z; } else { $a = 0; ++$i; } } die("$z"); ?> Answer: 7069. But the real answer is 1000, because if you have 1000 lockers to open, the first person would have already opened them all. Since there was no close routine, the second person wouldn't have anything to open, etc. ...to all those who have doubted me...come see me now... Asus A7N8X Deluxe r2.00 / UBER 1007 BIOS Modified AthlonXP 2100+ (1.73ghz) @ 200x11.5 (2.30ghz, ~3000-3200+) 1.85vcore (48c/load diode), SLK-800w/TTSFII 512mb PC3200 DualChannel 11-3-3-2, 2.7vdimm GFFX5200128bit128MB (295/432) 52x32x52CDRW, 160gb Hitachi 7K250 8mb WinXP / Gentoo Dell Inspiron 8000 in good shape, Compaq Presario 1200 12XL500 rigged to all hell 8000: DVD, CDRW, 384mb, 5400rpm 60gb 16mb cache, 1400x1050 15" 1200: CD, 192mb, 20gb, 1024x768 14" At least 6 hours battery time with both Dell C Bays ;], 175w DC to AC car inverter MSI CB54G Cardbus 802.11g, Dell Truemobile 1150 Orinoco Gold 802.11b, modded Tripmate GPS (always on/external power) Custom Spaghettios 26oz Waveguide Directional Tin Can Antenna Don't forget to chalk..
Iggy Posted September 27, 2003 Author Posted September 27, 2003 ERR WRONGO! -=VCP Forever=- | Official B.L.A.S.T.Addict
Alex3305 Posted September 27, 2003 Posted September 27, 2003 0 ! I think that is the awnser.. - GTA 2 - And Remeber, Respect is Everything YOU SUCK IF YOU READ THIS !! pwned by me. ©
Iggy Posted September 27, 2003 Author Posted September 27, 2003 nope, not close -=VCP Forever=- | Official B.L.A.S.T.Addict
True Posted September 27, 2003 Posted September 27, 2003 Oops, sorry, read the question wrong NOW I understand. Writing a new script... <?php $debug = 0; while ($i != 1001) { ++$i; $p = 0; while ($p < 1001) { $p = $p + $i; $z = $a[$p]; if ($z) { $z = "0"; } else { $z = "1"; } $a[$p] = $z; } if ($debug) { $c = ""; while ($d != 1000) { $c = "$c$a[$d]"; ++$d; } echo "$c "; $d = 0; } } while ($b != 1000) { if ($a[$b] == "1") { ++$total; } $z = "$z$a[$b]"; ++$b; } echo "Locker Status: $z "; echo "Total Open: $total "; echo "Total Closed: ".(1000 - $total).""; ?> So the answer is 31 open lockers... wish I read it right to begin with ...to all those who have doubted me...come see me now... Asus A7N8X Deluxe r2.00 / UBER 1007 BIOS Modified AthlonXP 2100+ (1.73ghz) @ 200x11.5 (2.30ghz, ~3000-3200+) 1.85vcore (48c/load diode), SLK-800w/TTSFII 512mb PC3200 DualChannel 11-3-3-2, 2.7vdimm GFFX5200128bit128MB (295/432) 52x32x52CDRW, 160gb Hitachi 7K250 8mb WinXP / Gentoo Dell Inspiron 8000 in good shape, Compaq Presario 1200 12XL500 rigged to all hell 8000: DVD, CDRW, 384mb, 5400rpm 60gb 16mb cache, 1400x1050 15" 1200: CD, 192mb, 20gb, 1024x768 14" At least 6 hours battery time with both Dell C Bays ;], 175w DC to AC car inverter MSI CB54G Cardbus 802.11g, Dell Truemobile 1150 Orinoco Gold 802.11b, modded Tripmate GPS (always on/external power) Custom Spaghettios 26oz Waveguide Directional Tin Can Antenna Don't forget to chalk..
RobZGod Posted September 27, 2003 Posted September 27, 2003 No lockers are open at the end, person number 5 throws a twinky to the end of the hall and a fat kid runs after it, shutting all the locker doors with his immense bulk. So is this where im supposed to put a witty comment
Guest Posted September 28, 2003 Posted September 28, 2003 god im tired my ass hurt my brain hurts my tessticals hurt.YAWN....OW.im..............going.................to.................bed.
Iggy Posted September 28, 2003 Author Posted September 28, 2003 TRUE GOT IT RIGHT, 31 LOCKERS -=VCP Forever=- | Official B.L.A.S.T.Addict
Iam A. Spammer Posted September 28, 2003 Posted September 28, 2003 I'm with RobZGod, they're all closed! Is this really my name or a reference to an ability of mine? FREE PRON
RobZGod Posted September 29, 2003 Posted September 29, 2003 Tip #1: If somethings too hard to work out, just be dumb. Yet be funny, because that kind of guy gets the social life So is this where im supposed to put a witty comment
True Posted September 29, 2003 Posted September 29, 2003 What is a social life? ...to all those who have doubted me...come see me now... Asus A7N8X Deluxe r2.00 / UBER 1007 BIOS Modified AthlonXP 2100+ (1.73ghz) @ 200x11.5 (2.30ghz, ~3000-3200+) 1.85vcore (48c/load diode), SLK-800w/TTSFII 512mb PC3200 DualChannel 11-3-3-2, 2.7vdimm GFFX5200128bit128MB (295/432) 52x32x52CDRW, 160gb Hitachi 7K250 8mb WinXP / Gentoo Dell Inspiron 8000 in good shape, Compaq Presario 1200 12XL500 rigged to all hell 8000: DVD, CDRW, 384mb, 5400rpm 60gb 16mb cache, 1400x1050 15" 1200: CD, 192mb, 20gb, 1024x768 14" At least 6 hours battery time with both Dell C Bays ;], 175w DC to AC car inverter MSI CB54G Cardbus 802.11g, Dell Truemobile 1150 Orinoco Gold 802.11b, modded Tripmate GPS (always on/external power) Custom Spaghettios 26oz Waveguide Directional Tin Can Antenna Don't forget to chalk..
Iggy Posted September 30, 2003 Author Posted September 30, 2003 I agree, what IS a social life? -=VCP Forever=- | Official B.L.A.S.T.Addict
Iam A. Spammer Posted September 30, 2003 Posted September 30, 2003 Its when you're not talking to your feet cuz your lonely I guess! Is this really my name or a reference to an ability of mine? FREE PRON
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now