This is not a polynomial-time algorithm, since $k$ is a number in the input, not the input size. Moreover, $k$ is not a constant, as would be required of a general polynomial-time algorithm for the \textsc {Clique} problem.