# How Many PRISONERS Are Free?

Level pendingThere are 50 prisoners in a row of locked cells. With the return of the King from the Crusades, a partial amnesty is declared and it works like this. When the prisoners are still asleep, the jailer walks past the cells 50 times, each time walking from left to right. On the first pass, he turns the lock in every cell (so that every cell is now open). On the second pass he turns the lock on every second cell (meaning that these cells are now locked again). On the third pass, he turns the lock on every third cell, and so on. In general, on thekth pass, he turns the lock on every kth cell. The question is: how many cells are unlocked at the end of the process so that the prisoner is free to go?

**Your answer seems reasonable.**Find out if you're right!

**That seems reasonable.**Find out if you're right!

Already have an account? Log in here.