function [length] = solution_hw3_p2(A, i, j)
    A0=A;
    length = 1;
    while A(i,j)==0 && length<=20
        length = length + 1;
        A = A*A0;
    end
end

