145 Doors Puzzle
This blog post contains Amazon affiliate links. As an Amazon Associate, I earn a small commission from qualifying purchases.
Can you solve the 145 Doors Puzzle to help a prisoner break out of a medieval dungeon with 145 doors?

The 145 Doors Puzzle is one of my favorite puzzles from The Moscow Puzzles: 359 Mathematical Recreations by Boris A. Kordemsky.
You can also find the 145 doors puzzle online at NCTM Illuminations.
Here’s the text of the puzzle:
A prisoner was thrown into a medieval dungeon with 145 doors. Nine, shown by black bars, are locked, but each one will open if before you reach it you pass through exactly 8 open doors. You don’t have to go through every open door but you do have to go through every cell and all 9 locked doors. If you enter a cell or go through a door a second time, the doors clang shut, trapping you.
The prisoner (in the lower right corner cell) had a drawing of the dungeon. He thought a long time before he set out. He went through all the locked doors and escaped through the last, upper left corner one.
What was his route?
Fair warning: the author of this puzzle classifies this as a “Difficult Problem.”
I first used this puzzle with my students back in 2015 when I was doing Brain Teaser Tuesday. I gave the puzzle to my students in a dry erase pocket to make it easy to show (and correct!) their work.
MATH = LOVE RECOMMENDS…
I cannot imagine teaching math without my dry erase pockets! They instantly make any activity more engaging and save me countless hours at the copy machine since I can use the same class sets of copies year after year.
Here are my current go-to recommendations:
If you don’t have a classroom set of dry erase pockets, you could also use heavy duty sheet protectors. But, I highly recommend investing in a classroom set of the pockets since they are so much more durable.
My students really struggled with this puzzle and wanted to give up easily. They were definitely not interested in persevering towards a solution which really made me sad.
Digital Version of 145 Doors Puzzle
Kathy Henderson has created a digital version of this 145 Doors Puzzle in Desmos Activity Builder.
Puzzle Solutions
Puzzle solutions are available on a password-protected solution page. I do not openly post the puzzle answer keys because one of my goals as a resource creator is to craft learning experiences for students that are non-google-able. I want teachers to be able to use these puzzles in their classrooms without the solutions being found easily on the Internet.
Please email me at sarah@mathequalslove.net for the password to the answer key database featuring all of my printable puzzles and math worksheets. I frequently have students emailing me for the answer key, so please specify in your email what school you teach at and what subjects you teach. If you do not provide these details, I will not be able to send you the password.
Not a teacher? Go ahead and send me an email as well. Just let me know what you are using the puzzles for. I am continually in awe of how many people are using these puzzles with scouting groups, with senior adults battling dementia, or as fun activities in their workplace. Just give me enough details so I know you are not a student looking for answers to the puzzle that was assigned as their homework!
I based my TED riddle https://www.youtube.com/watch?v=ZKh6z0X6KRw off of this puzzle!