Divisible Sum Pairs HackerRank - Problem Solving solution with detailed explanation and C++ code