Let $n \geq 2$ be an integer. Lucia chooses $n$ real numbers $x_1,x_2,\ldots,x_n$ such that $\left| x_i-x_j \right|\geq 1$ for all $i\neq j$. Then, in each cell of an $n \times n$ grid, she writes one of these numbers, in such a way that no number is repeated in the same row or column. Finally, for each cell, she calculates the absolute value of the difference between the number in the cell and the number in the first cell of its same row. Determine the smallest value that the sum of the $n^2$ numbers that Lucia calculated can take.
1. **Define the problem and notation:**
   Let \( n \geq 2 \) be an integer. Lucia chooses \( n \) real numbers \( x_1, x_2, \ldots, x_n \) such that \( |x_i - x_j| \geq 1 \) for all \( i \neq j \). She arranges these numbers in an \( n \times n \) grid such that no number is repeated in the same row or column. For each cell, she calculates the absolute value of the difference between the number in the cell and the number in the first cell of its same row. We need to determine the smallest value that the sum of these \( n^2 \) numbers can take.

2. **Arrange the numbers:**
   Without loss of generality, assume \( x_1 < x_2 < \ldots < x_n \). This implies \( x_i \geq x_1 + (i-1) \) for all \( i \).

3. **Calculate the differences:**
   For each row \( i \) and column \( j \), the number in the cell \((i, j)\) is \( x_{\sigma(j)} \), where \(\sigma\) is a permutation of \(\{1, 2, \ldots, n\}\). The difference for each cell in row \( i \) is \( |x_{\sigma(j)} - x_{\sigma(1)}| \).

4. **Sum of differences in each row:**
   For the first row, the differences are:
   \[
   |x_1 - x_1|, |x_2 - x_1|, \ldots, |x_n - x_1|
   \]
   The sum of these differences is:
   \[
   0 + (x_2 - x_1) + (x_3 - x_1) + \ldots + (x_n - x_1)
   \]
   Since \( x_i \geq x_1 + (i-1) \), the sum is:
   \[
   0 + 1 + 2 + \ldots + (n-1) = \frac{(n-1)n}{2}
   \]

5. **Generalize for all rows:**
   For the second row, the differences are:
   \[
   |x_1 - x_2|, |x_2 - x_2|, \ldots, |x_n - x_2|
   \]
   The sum of these differences is:
   \[
   (x_2 - x_1) + 0 + (x_3 - x_2) + \ldots + (x_n - x_2)
   \]
   Since \( x_i \geq x_2 + (i-2) \), the sum is:
   \[
   1 + 0 + 1 + 2 + \ldots + (n-2) = \frac{(n-2)(n-1)}{2} + 1
   \]

6. **Continue for all rows:**
   For the \( k \)-th row, the differences are:
   \[
   |x_1 - x_k|, |x_2 - x_k|, \ldots, |x_n - x_k|
   \]
   The sum of these differences is:
   \[
   (x_k - x_1) + (x_k - x_2) + \ldots + 0 + \ldots + (x_k - x_{k-1}) + (x_{k+1} - x_k) + \ldots + (x_n - x_k)
   \]
   The sum is:
   \[
   (k-1) + (k-2) + \ldots + 1 + 0 + 1 + \ldots + (n-k) = \frac{(k-1)k}{2} + \frac{(n-k)(n-k+1)}{2}
   \]

7. **Sum all rows:**
   Summing the differences for all rows, we get:
   \[
   \sum_{k=1}^n \left( \frac{(k-1)k}{2} + \frac{(n-k)(n-k+1)}{2} \right)
   \]
   Simplifying, we get:
   \[
   \sum_{k=1}^n \frac{(k-1)k + (n-k)(n-k+1)}{2}
   \]
   This simplifies to:
   \[
   \sum_{k=1}^n \frac{k^2 - k + n^2 - nk + n - k^2 + k}{2} = \sum_{k=1}^n \frac{n^2 - nk + n}{2}
   \]
   \[
   = \frac{n}{2} \sum_{k=1}^n (n - k + 1) = \frac{n}{2} \left( n^2 - \frac{n(n+1)}{2} + n \right)
   \]
   \[
   = \frac{n}{2} \left( n^2 - \frac{n^2 + n}{2} + n \right) = \frac{n}{2} \left( \frac{2n^2 - n^2 - n + 2n}{2} \right)
   \]
   \[
   = \frac{n}{2} \left( \frac{n^2 + n}{2} \right) = \frac{n(n^2 - n)}{3}
   \]

The final answer is \(\boxed{\frac{n^3 - n}{3}}\).