You are viewing a single comment's thread. Return to all comments →
Use modular math after each step. (a*b)%m == ((a%m)*(b%m))%m
Summing the N series
You are viewing a single comment's thread. Return to all comments →
Use modular math after each step. (a*b)%m == ((a%m)*(b%m))%m