3270. Find the Key of the Numbers
You are given three positive integers
num1,num2, andnum3.The
keyofnum1,num2, andnum3is defined as a four-digit number such that:
- Initially, if any number has less than four digits, it is padded with leading zeros.
- The
ithdigit (1 <= i <= 4) of thekeyis generated by taking the smallest digit among theithdigits ofnum1,num2, andnum3.Return the
keyof the three numbers without leading zeros (if any).
1 | func generateKey(num1, num2, num3 int) int { |