GGK interview question

Program to find highest remainder for a number for the given input.