Find the natural number n which has last digit X & if this last is moved to the front of the number, the number becomes Y times larger.
I received this riddle about a number that the rightmost digit moves to the front by multiplying by 9, the example was 142857 multiply by 5 it gives 714285, so, we had to find the number, the problem is that computing this number is not possible in a computer by using the traditional datatypes, so I created a program that calculates this numbers applying my own div operation based on this tutorial https://www.youtube.com/watch?v=fUQyyikMYY0, hope someone finds this useful.
Check the file answer.c with the final code