Sponsored
Use these hints if you're stuck. Try solving on your own first.
How far away can the next greater numerically balanced number be from n?
With the given constraints, what is the largest numerically balanced number?
Solve with full IDE support and test cases