Please tell how to solve this problem ? GCD2(problem link in description)

problem link:-GCD2 Problem - CodeChef

This may help

1 Like

Ok thanks

for(int i=0; i<strlen(b); i++)
mod = (mod*10 + b[i] - ‘0’ )%a;

what this line of code doing