You are given two positive integers n and target.
An integer is considered beautiful if the sum of its digits is less than or equal to target.
Return the minimum nonnegative integer x such that n + x is beautiful.
Constraints:
n
target
The input will be generated such that it is always possible to make n beautiful.
You are given two positive integers n and target.
An integer is considered beautiful if the sum of its digits is less than or equal to target.
Return the minimum nonnegative integer x such that n + x is beautiful.
Constraints:
n
target
The input will be generated such that it is always possible to make n beautiful.