So as from the hint video it’s very clear that i have to take mod with a number but with which number i have to choose in order to get correct answer and why…?
BIG GCD problem
The smaller number.
The larger number you will take in as a string and break it down into subparts while taking their mods with the smaller number.
It is basically an extension of Euclid’s theorem