Mad Teacher

A mad teacher had 100 students in his class. Once he took them to the playground and brought 100 boxes which could be opened and closed. When he brought the boxes, all of them were closed. He ordered the 1st boy to open all the boxes. So, the 1st boy opened them. Then he ordered the 2nd to close the 2nd, 4th, 6th, 8th..... numbered boxes. Next he told the 3rd boy to open(if closed box found) and close(if opened box found) the 3rd,6th,9th........boxes. Thus, when all of the boys finished, how many boxes will remain opened?


The answer is 10.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Notice that the box n n changes its state σ 0 ( n ) \sigma_0(n) times, where σ 0 ( n ) \sigma_0(n) denotes the number of positive divisors of n n . So for the box n n to be open, σ 0 ( n ) \sigma_0(n) should be odd.

Unless n n is a perfect square, every factor a i a_i of n n has a corresponding factor b i b_i such that a i b i = n a_i \cdot b_i = n making σ 0 ( n ) \sigma_0(n) even.

If n n is a perfect square, every factor a i a_i except n \sqrt{n} has a corresponding factor b i b_i such that a i b i = n a_i \cdot b_i = n so σ 0 ( n ) \sigma_0(n) is odd.

Since there are exactly 10 10 perfect squares from 1 1 to 100 100 , the answer is 10 \boxed{10} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...