OK - here's a harder one.
At Lincoln High School there are 100 lockers in the hallway in the Social Studies wing. At the end of the school year, the lockers are all unlocked, the students having cleaned them out. The next day starts summer vacation, which lasts for 100 days.
On the first day of school vacation, a janitor locks every locker.
On the second day of school vacation, the janitor unlocks every second locker, starting with locker #2.
On the third day of school vacation, the janitor checks every third locker, starting with locker #3. If the locker is locked, he unlocks it. If it is unlocked, he locks it.
On the fourth day of school vacation, the janitor checks every fourth locker, starting with locker #4, locking it if unlocked, unlocking it if locked.
Throughout the remainder of the school vacation he continues this process - on day n he checks every nth locker, starting with locker #n - locking if unlocked and locking if unlocked.
At the end of the last day of vacation (i.e., at the end of day 100, after the janitor has completed his 100th time of checking lockers), how many lockers are locked and how many are unlocked.
Figure out the answer deductively - not by working it out on paper.
At Lincoln High School there are 100 lockers in the hallway in the Social Studies wing. At the end of the school year, the lockers are all unlocked, the students having cleaned them out. The next day starts summer vacation, which lasts for 100 days.
On the first day of school vacation, a janitor locks every locker.
On the second day of school vacation, the janitor unlocks every second locker, starting with locker #2.
On the third day of school vacation, the janitor checks every third locker, starting with locker #3. If the locker is locked, he unlocks it. If it is unlocked, he locks it.
On the fourth day of school vacation, the janitor checks every fourth locker, starting with locker #4, locking it if unlocked, unlocking it if locked.
Throughout the remainder of the school vacation he continues this process - on day n he checks every nth locker, starting with locker #n - locking if unlocked and locking if unlocked.
At the end of the last day of vacation (i.e., at the end of day 100, after the janitor has completed his 100th time of checking lockers), how many lockers are locked and how many are unlocked.
Figure out the answer deductively - not by working it out on paper.
Comment