What is the unique three-digit positive integer $x$ satisfying $$100x\equiv 1\pmod{997}~?$$
I know that $100x\equiv 1\pmod{997}$ means that $100x$ and $1$ have the same remainder when divided by $997$. So, I want to find a value of $x$ that makes $100x$ as close to $1$ as possible, but still larger than $1$. I also know that $997$ is a prime number, so there is no common factor between $100$ and $997$. This means that there is a unique value of $x$ that satisfies the congruence, and it is the inverse of $100$ modulo $997$. To find the inverse of $100$ modulo $997$, I can use the extended Euclidean algorithm, which finds integers $a$ and $b$ such that $100a+997b=1$. Then, $a$ will be the inverse of $100$ modulo $997$, and $b$ will be the inverse of $997$ modulo $100$. To apply the algorithm, I start by writing $997=9\cdot 100+97$, which gives me the first equation $997-9\cdot 100=97$. Then, I divide $100$ by $97$ and write $100=1\cdot 97+3$, which gives me the second equation $100-1\cdot 97=3$. Then, I divide $97$ by $3$ and write $97=32\cdot 3+1$, which gives me the third equation $97-32\cdot 3=1$. Now, I have reached $1$, so I can stop the algorithm and work backwards to find $a$ and $b$. I start from the third equation and write $1=97-32\cdot 3$. Then, I substitute $3$ from the second equation and write $1=97-32\cdot (100-1\cdot 97)$. I simplify and write $1=(-32)\cdot 100+33\cdot 97$. Then, I substitute $97$ from the first equation and write $1=(-32)\cdot 100+33\cdot (997-9\cdot 100)$. I simplify and write $1=(-32-297)\cdot 100+33\cdot 997$. I simplify and write $1=(-329)\cdot 100+33\cdot 997$. This gives me the final equation $100\cdot (-329)+997\cdot 33=1$. Therefore, $a=-329$ and $b=33$. To find the inverse of $100$ modulo $997$, I need to make sure that $a$ is positive and less than $997$. I can do this by adding $997$ to $a$ until it becomes positive. I see that $a+997=668$, which is positive and less than $997$. Therefore, $668$ is the inverse of $100$ modulo $997$, and it is also the value of $x$ that I am looking for. I can check that $100\cdot 668\equiv 1\pmod{997}$ by dividing $100\cdot 668$ by $997$ and seeing that the remainder is $1$. Indeed, $100\cdot 668=66800=67\cdot 997+1$. So, I have found the unique three-digit positive integer $x$ that satisfies the congruence. 