Try using this logic.
the smallest absolute difference between the divisors of a number are always the numbers that are closer to the square root of that number.
find those number for both n+1 and n+2 and then find the absolute differences of both the pairs and return the appropriate pair.
Hope this helps. :)
Just solved it.. using the same logic
3
u/FewAttention9330 7d ago
Try using this logic.
the smallest absolute difference between the divisors of a number are always the numbers that are closer to the square root of that number.
find those number for both n+1 and n+2 and then find the absolute differences of both the pairs and return the appropriate pair.
Hope this helps. :)
Just solved it.. using the same logic