There are 1000 doors D1;D2; : : : ;D1000 and 1000 persons P1; P2; : : : ; P1000.Initially all the doors were closed. Person P1 goes and opens all the doors.Then person P2 closes door D2;D4; : : : ;D1000 and leaves the odd num-bered doors open. Next P3 changes the state of every third door, thatis, D3;D6; : : :D999. (For instance, P3 closes the open door D3 and opensthe closed door D6, and so on). Similarly, Pm changes the state of thethe doors Dm;D2m;D3m; : : : ;Dnm; : : : while leaving the other doors un-touched. Finally, P1000 opens D1000 if it was closed or closes it if it wereopen. At the end, how many doors will remain open?
Soumyadip , 11 Years ago
Grade 12