In an n\times n chessboard, every square contains an integer. If every column and row has at least k distinct integers, where 0<k\leq n, find the minimum number of distinct integers in the chessboard.

Thank you.