Skip to Content

145 Doors Puzzle

Can you solve the 145 Doors Puzzle to help a prisoner break out of a medieval dungeon with 145 doors?

145 Doors Puzzle.

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?

Maze for 145 Doors Puzzle from The Moscow Puzzles
Image Source: The Moscow Puzzles (Published by Dover)

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.  


dry erase pockets

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.  

145 Doors Puzzle from The Moscow Puzzles One Hundred Forty Five Doors by Boris A Kordemsky

Digital Version of 145 Doors Puzzle

Kathy Henderson has created a digital version of this 145 Doors Puzzle in Desmos Activity Builder.

Puzzle Solutions

I intentionally do not make answers to the printable math puzzles I share on my blog available online because I strive to provide learning experiences for my students that are non-google-able. I would like other teachers to be able to use these puzzles in their classrooms as well without the solutions being easily found on the Internet.

However, I do recognize that us teachers are busy people and sometimes need to quickly reference an answer key to see if a student has solved a puzzle correctly or to see if they have interpreted the instructions properly.

If you are a teacher who is using these puzzles in your classroom, please send me an email at with information about what you teach and where you teach. I will be happy to forward an answer key to you.

More Dry Erase Puzzles

Lisa Winer

Tuesday 2nd of February 2021

I based my TED riddle off of this puzzle!

Comments are closed.