Leetcode 2457. Minimum Addition to Make Integer Beautiful
Find the smallest non‑negative x such that the digit sum of n+x is ≤ target. This reduces to finding the minimal increment that rounds n up at some digit position (carrying through lower digits to zero them) until the resulting digit sum becomes ≤ target.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.