"Given a nxn matrix with all of the entries along the main diagonal equal to zero, and every off-diagonal entry equal to one, compute its determinant"

This is a question from a past exam paper I was working on. I understand that the determinant is equal to , but I only got this from computing the inverse of 2x2, 3x3, 4x4, and 5x5 matrices of similar form, until I saw th pattern and then generalised, but I don't think this would be an acceptable method in an exam. I'm trying to find a wat to formally prove this, but all I could think of was proof by induction, and I couldn't work that out. Am I going at it the right way by induction, or is there another method?