Hackerrank Divisible Sum Pairs problem Solution Explained in java