Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find a formula for the number of apples inside a square with a side length L.
Iterate over the possible lengths of the square until enough apples are collected.
Solve with full IDE support and test cases