Can anyone help me with Great Chase from TCS Mockvita 2018 Contest?

Hi Guys can someone tell me how to solve this problem ?

@vijju123 @taran_1407 @vivek_1998299 @meooow @john_smith_3 @aryanc403 @vbt_95

My Approach :
I tried using Extended Euclid’s Algorithm for this but I am not able to solve this problem.

NOTE : This question is not from an ongoing contest. It’s a past contest problem :slight_smile:

Check this out it’ll help http://mathforum.org/library/drmath/view/51595.html

Here is the link to my code

2 Likes

Here is the link to my code

Bro thanks for this one more problem I am facing issues is this one https://drive.google.com/open?id=1RES-RH9ogwy6biHl0k-9bcqFimukP7ov

Cases for the option that they never catches?