Find the largest positive integer $n$ such that the following is true:
There exists $n$ distinct positive integers $x_1,~x_2,\dots,x_n$ such that whatever the numbers $a_1,~a_2,\dots,a_n\in\left\{-1,0,1\right\}$ are, not all null, the number $n^3$ do not divide $\sum_{k=1}^n a_kx_k$.
1. **Understanding the problem**: We need to find the largest positive integer \( n \) such that there exist \( n \) distinct positive integers \( x_1, x_2, \ldots, x_n \) with the property that for any choice of \( a_1, a_2, \ldots, a_n \in \{-1, 0, 1\} \), not all zero, the sum \( \sum_{k=1}^n a_k x_k \) is not divisible by \( n^3 \).

2. **Using the Pigeonhole Principle**: Consider all sums of the form \( \sum_{i=1}^n b_i x_i \) where \( b_i \in \{0, 1\} \). There are \( 2^n \) such sums. If \( 2^n > n^3 \), then by the Pigeonhole Principle, there must be at least two distinct sums that have the same remainder when divided by \( n^3 \).

3. **Contradiction**: If there are two distinct sums with the same remainder modulo \( n^3 \), their difference will be divisible by \( n^3 \). This difference will be of the form \( \sum_{k=1}^n a_k x_k \) where \( a_k \in \{-1, 0, 1\} \), which contradicts the given condition.

4. **Finding the threshold**: We need to find the largest \( n \) such that \( 2^n \leq n^3 \). By testing values, we find:
   - For \( n = 9 \), \( 2^9 = 512 \) and \( 9^3 = 729 \), so \( 2^9 < 9^3 \).
   - For \( n = 10 \), \( 2^{10} = 1024 \) and \( 10^3 = 1000 \), so \( 2^{10} > 10^3 \).

   Therefore, the largest \( n \) satisfying \( 2^n \leq n^3 \) is \( n = 9 \).

5. **Verification for \( n = 9 \)**: We need to show that for \( n = 9 \), there exist \( x_1, x_2, \ldots, x_9 \) such that \( 729 \) does not divide any non-zero sum \( \sum a_k x_k \). Consider \( x_k = 2^{k-1} \) for \( k = 1, \ldots, 9 \). The maximum possible value of \( \sum a_k x_k \) in absolute value is \( 2^8 + 2^7 + \cdots + 2^0 = 511 \), which is less than \( 729 \). Hence, \( 729 \) cannot divide any non-zero sum \( \sum a_k x_k \).

The final answer is \( \boxed{9} \).