Solving $ax \equiv c \pmod b$ efficiently when $a,b$ are not coprime I know how to compute modular multiplicative inverses for co-prime variables $a$ and $b$, but is there an efficient method for computing variable $x$ where $x < b$ and $a$ and $b$ are not co-prime, given variables $a$, $b$ and $c$, as described by the equation below? 
$ a x \equiv c \mod b $ 
For example, given
$ 154x \equiv 14 \mod 182 $, is there an efficient method for computing all the possibilities of $x$, without pure bruteforce?
Please note that I'm not necessarily asking for a direct solution, just a more optimized one.  
I do not believe that the Extended Euclidean Algorithm will work here, because $a$ and $b$ are not co-prime. 
Edit: 
Follow up question, since the first one had a shortcut:
Could the be computed efficiently as well?
$12260x \equiv 24560 \mod 24755$.
$107$ needs to be one of the computed answers.  
 A: Solving $154x \equiv 14 \pmod{182}$ is the same as finding all solutions to
$$ 154x + 182y = 14.$$
In this case, we might think of this as finding all solutions to
$$14(11x + 13y) = 14(1),$$
or rather
$$11x + 13 y = 1.$$
Finally, solving this is the same as solving $11x \equiv 1 \pmod {13}$, which has solution $x \equiv 6 \pmod{13}$.
So we learn that $x \equiv 6 \pmod{13}$ is the solution. Of course, this isn't a single residue class mod $182$. Thinking modulo $182$, we see that the solutions are $x \equiv 6, 6+13,6+26,6+39, \ldots, 6+13*13 \equiv 6, 19, 32, \ldots, 175.$
This approach works generally --- factor out the greatest common divisor, consider the resulting modular problem, and then bring it back up to the original problem.
A: Below  we compute $\  x\,\equiv\, \dfrac{24560}{12260}\,\pmod{\!24755}\ $ per your edit, $ $ by the method in my first answer.
${\rm mod}\,\ 24755\!:\,\ 
\dfrac{0}{24755}\overset{\large\frown}\equiv
\dfrac{24560}{12260}\overset{\large\frown}\equiv
\color{#90f}{\dfrac{390}{235}}\overset{\large\frown}\equiv
\color{#0a0}{\dfrac{4280}{40}}\overset{\large\frown}\equiv
\color{#c00}{\dfrac{-535}{-5}}\overset{\large\frown}\equiv\dfrac{0}0$
$ \begin{array}{rl}
\ \ \ \ {\rm i.e.}\ \ \ \ \bmod 24755\!:  \ \ \ \ \ [\![1]\!]  &\ 24755\, x\,\equiv\  0\    \\
[\![2]\!]  &\ \color{c00}{12260\,x\, \equiv\ 24560\equiv -195}\!\!\!\\
[\![1]\!]\:\!-\:\!2\,[\![2]\!] \rightarrow [\![3]\!] &\ \ \ \ \   \color{#90f}{235\,x\, \equiv\  390}\   \\
[\![2]\!]\!-\!\color{1orange}52\,[\![3]\!] \rightarrow [\![4]\!] &\ \ \ \ \ \ \, \color{#0a0}{40\,x\, \equiv\ 4280}\ \\
[\![3]\!]\:\!-\:\!\color{}6\,[\![4]\!] \rightarrow [\![5]\!] &\:\! \ \ \ \ \ \color{#c00}{{-}5\,x\, \equiv -535}\  \\
[\![4]\!]\:\!+\:\!\color{1orange}8\,[\![5]\!] \rightarrow [\![6]\!] &\:\!\ \ \ \ \ \ \ \  \color{90f}{0\,x\, \equiv\ 0}\
\end{array}$
$\begin{align}{\rm Therefore}\ \ \  x\equiv {\color{#c00}{\dfrac{535}5}\!\!\!\pmod{24755}}&\equiv \,107\!\!\pmod{\!4951},\ \ {\rm by\ canceling}\ \ 5\ \ \rm\color{darkorange}{everywhere}\\ &\equiv\, 107+4951k\!\!\pmod{\!24755},\ \ 0\le k\le 4\\[0.5em] 
&\equiv \{107,\, 5058,\, 10009,\, 14960,\, 19911\}\!\pmod{\!24755}\end{align} $
Remark $ $ As explained in my other answer, the chain of equations (or fractions) means that $x$ is the solution of the system formed by any neighboring pair of equations (or fractions). We start (and end) with the  equation $\,0\:\!x\equiv 0\,$ (or fraction $\,0/0),\,$ which has all integers as roots, so deleting it from a pair does not affect the solution set.
A: To solve $ax\equiv c \mod b$, set  $\;d=a\wedge b$, $\;a=a'd, \;b=b'd$. This congruence implies $c$ is divisible by $d$. Actually, it's easy to see that
$$ax\equiv c\mod b\iff \begin{cases}c\equiv 0\mod a\wedge b\\\text{and}\\a'x\equiv c'=\dfrac{c}{a\wedge b} \mod b'
\end{cases}$$
Thus the problem comes down to the case $a$ and $b$ coprime, after a compatibility condition has been checked.
Added: solution of the second congruence
First we check with the Euclidean algorithm that $\gcd(12260,24755)=5$, and $$\frac{12260}5=2452,\quad\frac{24755}5=4951,\quad\frac{24560}5=4912. $$
Thus the given congruence is equivalent to
$ \; 2452 x\equiv 4912\mod 4951$, and we have to find the inverse of $2452$ modulo $4951$. This means we have to find a *Bézout's relation between $2452$ and $4951$. It can be obtained with the extended Euclidean algorithm:
$$\begin{array}{rrrr}
r_i&u_i&v_i&q_i\\
\hline
4951&0&1\\
2452&1&0&2\\\hline
47&-2&1&52\\
8&105&-52&5\\
7&-527&261&1\\
1&632&-313\\\hline
\end{array}$$
Thus $632\cdot2452-313\cdot4951=1$, whence $2452^{-1}=632\bmod4951$, and the solution is 
$$x\equiv 632\cdot4912\equiv 107\mod4951.$$
A: From your question, I assume you know how to use the extended Euclidean algorithm to compute the modular inverse $a^{-1} \pmod b$ when $a$ is coprime to $b$.  Even when $a$ is not coprime to $b$, you can actually solve $ax \equiv c \pmod b$ in almost exactly the same way, assuming that a solution exists.
What the extended Euclidean algorithm actually computes, given the inputs $a$ and $b$, is a triple of integers $(\bar a, \bar b, g)$ such that $g$ is the greatest common divisor of $a$ and $b$, and $a\bar a + b\bar b = g$.  When $g = 1$, then $\bar a = a^{-1} \pmod b$, and we can use it to compute the solution $x \equiv c \bar a \pmod b$ to the modular congruence $ax \equiv c \pmod b$.
When $g$ is not $1$, we might call the pair $(\bar a, g)$ the pseudoinverse* of $a$ modulo $b$, as it satisfies the congruence $a \bar a \equiv g \pmod b$, where $g$ is the smallest positive number for which such a congruence exists.  Thus, given the congruence $ax \equiv c \pmod b$, we can multiply both sides by $\bar a$ to obtain $gx \equiv c \bar a \pmod b$.  If (and only if) $c$ is divisible by $g$, we can also then divide both sides by $g$ (using normal integer division!) to obtain the solution $x \equiv c\bar a / g \pmod b$.  Of course, this solution is only unique modulo $b/g$.
Otherwise, if $c$ is not divisible by $g$, no solution exists.
*) You will not find the term "modular pseudoinverse" in any textbooks, since I just made it up.  I'm not aware of any more established term for this useful concept, though, and at least it's descriptive, so please indulge me for using it here.
A: Using Euler's Theorem for modular multiplicative inverses:
$\varphi(182) = 72$
$x \equiv 154^{\varphi(182)-1} \pmod{182} \Rightarrow 84 \equiv 154^{71} \pmod{182}$
Now every $x$ of the form $x=84 \pm k\cdot182$ will satisfy 
$154x \equiv 14 \pmod{182}$
A: One way to solve the problem ax ≡ c (mod b) would be to treat it as a problem in finding 0,1 for the linear equation ax0 − bx1 = c where ,,,0,1 ∈ . One way to solve the linear equation would be to use substitution in two ways: first to introduce a new variable and a new equation at each step to create a linear system of equations, and second to turn every non-basic variable in the linear system of equation into a basic variable. The motivation for the use of substitution is to express each original variable (0,1) as a basic variable that is a function of parameter variables (0,1,…) such that for any integer value assigned to the parameter variables would result in the original variables taking on integer values. The computations in the algorithm may be organized using augmented matrices.
I have applied one such algorithm to your example problems in "Solving 154x ≡ 14 (mod 182) and 12260x≡ 24560 (mod 24755) Using Augmented Matrices". It also includes an explanation for the algorithm and an animation of the step-by-step solution to the problems.
