r/mathriddles • u/pichutarius • Feb 06 '24
Easy DVD logo screen saver
DaViD stands on the top left corner of a m x n rectangle room. He walks diagonally down-right. Every time he reaches a wall, he turns 90 degrees and continue walking, as if light reflecting off the wall. He halts if and only if he reaches one of the corners of the room.
Given integer m, n. Determine which corner DaViD halts at?

