I know:
1. If x is divided by 30 the remainder is 4.
2. If y is divided by 30 the remainder is 18.
Now the question is how do you show that x*y divided by 30 will give the remainder 12.
I know that I can brute force it, like so:
34/30 --> remainder will be 4, so x=34
48/30 --> remainder will be 18, so y=48
This gives:
(34*48)/30 --> remainder will become 12 which was to be proven.
However I'm wondering if there is a more "elegant" way of showing this, in a more logical way, rather than just guessing some numbers and putting them together?