Let $p$ be a prime number, let $m$ be a fixed number (for example $2^{20}$), and $i=k^{-1}\cdot (j-t) \pmod{p}$ where $j \leq m$ and $m<k$.

In the general case we have $t=0$, and $k,j$ are variable and in special case $t$ and $k$ are fix and we know its values.

is there a way to find the minimum value of $i$?

**Example:** In special case, let $p=7$,$t=3$,$k=3$ and $m=2$.

if $j=1$ then $i=4$ and if $j=2$ then $i=2$. So minimum value of $i$ is $2$.

In general case we can search all possible cases for $k,j$ and then find the minimum value of $i$'s.

If $m$ be so large we cant search all possible $j$. So Im looking for general method to solve this problem without searching.