Hello I was building an app on the Chinese Remainder Theorem. The questions are generally like this:
When a number x is divided by 2, the remainder is 1. When it is divided by 3, the remainder is 2. When it is divided by 5, the remainder is 1. Find the least possible value of x.
I did the following code but every time I run it, it ends up showing only the variable ans as output.