It doesn't matter that you copied the question incorrectly catmg. It is not YOUR homework.
You explained your method the best you could and that is all that counts.
The asker is always expected to check then accept, edit or reject the answers given to them.
I learned from your answer in that I looked up the Chinese remainder theorem. Thanks
This is the video that I learned from. I found it excellent.
It is from a channel called "Maths with Jay"
I got the answer 1166 (which is the same as our first guest's answer.)
https://www.youtube.com/watch?v=zIFehsBHB8o