Let $A \subset \Bbb Z$ with $|A| = n$, and $p$ be a prime. Consider $\phi:\Bbb R \to [0,\frac12]$ given by $\phi(x) = \min\{x-[x], 1 + [x] - x\}$, where $[\cdot]$ is the floor function. There exists $t \in \Bbb Z\setminus p\Bbb Z$ such that $\phi(at/p) \le p^{-1/n}$ for all $a\in A$.
$\phi(x)$ is just the distance of $x$ from the nearest integer, $[x]$ or $[x] + 1$. The problem gives pigeonhole principle vibes, but I'm yet to identify the pigeons and the holes.
Regardless, here's my attempt. I'll consider $n=1$ first. Let $A = \{a\}$ and $p$ be a prime. If $p \mid a$, then $a/p \in \Bbb Z$, and any choice of $t\in \Bbb Z\setminus p\Bbb Z$ works. Assume $p \not\mid a$. Then, we can express $a = pk + r$ for $1 \le r \le p -1$ and $k\in \Bbb Z$. Consequently, $$\phi\left(\frac{at}{p} \right) = \phi\left(kt + \frac{rt}{p} \right) = \phi\left(\frac{rt}{p} \right)$$
We want $t\in \Bbb Z$, $t\notin p\Bbb Z$ such that $\phi(rt/p) \le 1/p$. Now, $r/p$ is in $S_p := \{1/p, 2/p, \ldots, 1 - 1/p\}$ and the fractional part of $rt/p$ for $t\in \Bbb Z\setminus p\Bbb Z$ also lies in $S_p$. It shall suffice to show that for some $t\in \Bbb Z\setminus p\Bbb Z$, we have $\{rt/p\} = 1/p$ (or $1 - 1/p$.) This amounts to solving the congruence $rt \equiv 1 \bmod p$ for $t\in \Bbb Z\setminus p\Bbb Z$. Since $r \ne 0$, and $\Bbb Z/p\Bbb Z$ is a field ($p$ is prime), every non-zero element (in particular, $r$) is invertible. So we are done. Note that $(\Bbb Z/p\Bbb Z)\setminus\{0\} \subset \Bbb Z\setminus p\Bbb Z$ when viewed under the inclusion $\Bbb Z/p\Bbb Z \hookrightarrow \Bbb Z$.
I haven't been able to generalize this to $n\in \Bbb N$ yet, and I'd appreciate any hints or ideas to help me progress.
To use the pigeonhole principle, I suspect one should begin working with the cube $[0,1]^n$ and divide it into $p$ parts.
Notation:
- $\{x\}$ denotes the fractional part of $x \in \Bbb R$.
Let $d_n$ be the following metric on the torus $\mathbb T^n:=\mathbb R^n/\mathbb Z^n$: $$d_n(x,y)=\max_{1 \le i \le n} d_1(x_i,y_i)$$ where $$d_1(x_i,y_i):=\min_{m \in \mathbb Z} |x_i-y_i-m| \,.$$
Without loss of generality, we may assume that $A=\{a_1,\dots,a_n\} \subset \{0,1,\dots,p-1\}$. Let $v=(a_1/p,\dots,a_n/p) \in \mathbb T^n$.
For each $k \in \{0,1,\dots,p-1\}$, let $$Q_k:=\{x \in \mathbb T^n : d_n(x, kv) \le p^{-1/n}/2 \} $$ be the cube centered at $\, kv \in \mathbb T^n $ of side-length $p^{-1/n}$.
If these $p$ cubes were pairwise disjoint, then some $p$ open cubes containing the $Q_k$ would also be disjoint by compactness; this would yield a contradiction, since the volume of each $Q_k$ is $1/p$.
Therefore, there exist distinct $k,m \in \{0,1,\dots,p-1\}$ such that $Q_k \cap Q_m \ne \emptyset$, so $d_n(kv,mv) \le p^{-1/n}$ by the triangle inequality. Thus $\ell:=|k-m| \in \{1,\dots,p-1\}$ satisfies $$d_n(\ell v,\mathbf 0) \le p^{-1/n} \,,$$ as required.