Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find the divisors of n+1 and n+2.
To find the divisors of a number, you only need to iterate to the square root of that number.
Solve with full IDE support and test cases