hacker rank and beginnin gmatrix multiplication voodoo black magic