Lets assume you have a room of 10 switches that are all turned off. You also have 10 robots named 1-10. Starting with robot #1, it goes over and flips all of the switches divisible by its name. When I said flip, I mean it flips the switch in the opposite direction it is currently in (on or off). So, robot #1 would flip all switches on.
Then, robot #2 comes over and flips all of the switches divisible by its name. So robot #2 would flip every even switch.
Then robot #3 comes over and flips all of the switches divisible by its name. So robot #3 would flip every 3rd switch in the series.
This continues on until the last robot, #10, has finished it's turn. By the end of this process, how can we determine how many switches will be "ON"? Is there generalized process to figure out this sort of problem? I don't necessarily want the answer, I just am curious how you would go about figuring this out.