Add new comment


Each cell number 1-100 (say it k) is the product of two integers, say m*n. If k is prime, there is only one pair of (m, n); otherwise there are more.

Doors, being initially locked ("There are 100 prisoners in 100 separate locked cells."), prison officer m (m is a divisor of k) visits the cell k and unlocks it, while later prison officer n in its visit locks the cell.

Lucky cells are 10: those that have odd number of divisors, where m=n, that means no prison officer visits the cell later, which means k = perfect square
1, 4, 9, 16, 25, 36, 49, 64, 81, 100.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.