Now, we have 2 variables and there’s only 1 equation, so obviously we are going to have infinite solutions and we will have to proceed with the trial and error method to obtain the first solution.
If we try with M as 1, we get a number that leaves 10 as the remainder with 23. If we try with M as 2, we get a number that leaves 8 as the remainder with 23. So we expect 0 as the remainder when M=6.
If we try with M as 6, indeed we get 0 as the remainder with the number 504×6–11=3013
Hence required number is 3013.