Find three integers $x$ so that $271x \equiv 272\pmod{2015}$ I know that $\forall{a,n}\in\mathbb{Z}:\Bigl[\gcd(a,n)=1\Bigr]\implies\Bigl[\exists{k}\in\mathbb{Z}:ak\equiv1\pmod{n}\Bigr]$
In other words, for every pair of co-prime integers $a$ and $n$, there is an integer $k$ which is the inverse of $a\pmod{n}$.
Using Euclidean algorithm, I have found:


*

*The inverse of $271\pmod{2015}$ is $461$

*The inverse of $2015\pmod{271}$ is $209$


I do not understand how to apply this in the context of the question above.
I tried simplifying it in the same way but I ended up stuck and unable to find an integer $x$ such that $271x\equiv272\pmod{2015}$.
I can find many different inverses I think, but none of them are integers.
 A: Something to get you started:
The greatest common divisor of 271 and 2015 is 1, thus 271 has an inverse (mod 2015).
You may find the inverse of 271 (mod 2015) by using the Euclidean algorithm. 
Multiplying both sides by this inverse will give you x equivalent to some number (mod 2015).
A: Hint:
$271x\equiv272\pmod{2015}\iff$
$271x=2015n+272\iff$
$271x-271=2015n+1\iff$
$271(x-1)=2015n+1\iff$
$271y=2015n+1\iff$
$271y\equiv1\pmod{2015}$
Now simply find $y$, which is the inverse of $271\pmod{2015}$, and then calculate $x=y+1$.

Here is a piece of C code that you might find useful:
int Inverse(int n,int a)
{
    int x1 = 1;
    int x2 = 0;
    int y1 = 0;
    int y2 = 1;
    int r1 = n;
    int r2 = a;

    while (r2 != 0)
    {
        int r3 = r1%r2;
        int q3 = r1/r2;
        int x3 = x1-q3*x2;
        int y3 = y1-q3*y2;

        x1 = x2;
        x2 = x3;
        y1 = y2;
        y2 = y3;
        r1 = r2;
        r2 = r3;
    }

    return y1>0? y1:y1+n;
}


Calling Inverse(2015,271) will give you the inverse of $271\pmod{2015}$.
A: Hint:
\begin{equation*}
ax\equiv b\;\left(mod\;m\right)
\end{equation*}
\begin{equation*}
a^{-1}\cdot ax\equiv a^{-1}\cdot b\;\left(mod\;m\right)
\end{equation*}
\begin{equation*}
x\equiv a^{-1}\cdot b\;\left(mod\;m\right)
\end{equation*}
