There are 50 doors in a tower and there are 50 tourists; the first one opens all 50 doors of the tower; next the second one closes the doors 2,4,6,8,10 and so on to door 50; the third one changes the state(opens the door closed, closes the door opened) on door 3,6,9,12,15 and so on; the fourth one changes the state of doors 4,8,12,16 and so on. This goes on until every tourist had their turn. how many doors were touched exactly twice??
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.
The doors with numbers which have only two factors were touched exactly twice. only prime numbers have two factors(1 and themselves). the prime numbers from 1 to 50 are 2,3,5,7,11,13,17,19,23,29,31,37,43,47 so there are 15 doors which touched exactly twice...