I am looking for other solution of a problem, which I named:
$$\text{Simple hit problem}$$
Let:
$$y = \frac{a x + b}{c}$$
$$a, b, c, x \in \Bbb{Z}$$
For which $a, b, c$ there exists $x$ for such $y \in \Bbb{Z}$ ?
I noticed that the solution exists for $a, b, c$, if:
$$(ax) \ \text{mod} \ c = c - (b \ \text{mod} \ c),$$
but the approach relies on checking all unique values of result of modulo operator from left side of equation.
The question is, if there exists any better approach for this problem or anyway it come down to check, if some equation will be true for some $x \in A$, where A will be a set of finite ammount of values ?