In: Advanced Math
There are 1000 mailboxes at a post office, numbered 1, 2, 3, …, 1000. There are also 1000 mailbox owners, one for each mailbox. At the start of the Mailbox Challenge, all mailboxes are closed and the owners open and close the mailboxes according to the following rules:
Owner 1 opens every mailbox.
Owner 2 closes every second mailbox; that is, lockers 2, 4, 6, 8, …, 1000.
Owner 3 changes the state of every third locker, closing it if it is open and
opening it if it is closed.
Owner n changes the state of every nth mailbox, etc.
When all the owners have taken their turns, how many mailboxes are open?
If you need any further clarification regarding this problem feel
free to comment below