You are given two integers num and sum.
A positive integer is defined as good if:
It contains exactly num digits without leading zeros.
The sum of its digits equals sum.
The score of a good integer is the sum of the squares of its digits.
Return the good integer that achieves the maximum score as a string. If there are multiple good integers that achieve the maximum score, return the largest one among them. If no good integer exists, return an empty string "".
Constraints:
num
sum
You are given two integers num and sum.
A positive integer is defined as good if:
It contains exactly num digits without leading zeros.
The sum of its digits equals sum.
The score of a good integer is the sum of the squares of its digits.
Return the good integer that achieves the maximum score as a string. If there are multiple good integers that achieve the maximum score, return the largest one among them. If no good integer exists, return an empty string "".
Constraints:
num
sum