Jump to content

Hard math question


Iggy

Recommended Posts

Posted

there are 1000 lockers and 1000 people, the 1st person opens ever locker, the second person changes every other locker (2,4,6,8) 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

Posted

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..

Posted

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 :P

...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..

Posted

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. :P

UOSig3+copy.jpg

So is this where im supposed to put a witty comment :P

Posted

god im tired my ass hurt my brain hurts my tessticals hurt.YAWN....OW.im..............going.................to.................bed.

Posted

Tip #1: If somethings too hard to work out, just be dumb. Yet be funny, because that kind of guy gets the social life :P

UOSig3+copy.jpg

So is this where im supposed to put a witty comment :P

Posted

What is a social life? :lol:

...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..

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...