This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Nichodon
Nichodon presents ...

2016/4/10

Locker Problem

LEFT: Decrease step. RIGHT: Increase step.
SPACE: FAST MOOODE.

The Locker Problem goes as follows:

1. 100 lockers, closed. There are 100 people.
2a. Person 1 opens all, every first locker.
2b. Person 2 closes every second locker.
2b. Person 3 changes the state of every third, and so on.
3. Changing state means if opened, close; if closed, open.
4. After 100 people, which are opened?

The highlighted lockers are the ones just updated.

2026 views / 602 in the last 7 days

Tags: simulation nichodon locker riddle

This scenario is a member of: Nichodon's Suff


Your browser is ignoring the <APPLET> tag.

No Comments

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.