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?
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.
Notice that the box n changes its state σ 0 ( n ) times, where σ 0 ( n ) denotes the number of positive divisors of n . So for the box n to be open, σ 0 ( n ) should be odd.
Unless n is a perfect square, every factor a i of n has a corresponding factor b i such that a i ⋅ b i = n making σ 0 ( n ) even.
If n is a perfect square, every factor a i except n has a corresponding factor b i such that a i ⋅ b i = n so σ 0 ( n ) is odd.
Since there are exactly 1 0 perfect squares from 1 to 1 0 0 , the answer is 1 0 .