N Mod M https://www.codeeval.com/open_challenges/62/