Practice Find the Key of the Numbers
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given num1, num2, and num3, write each as four digits by adding leading zeroes when needed. Form a four-digit key by taking the smallest digit among the three numbers at each position. Return the key as an integer, without leading zeroes.
Source: Find the Key of the Numbers on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
num1 = 1, num2 = 10, num3 = 1000
Output
0
# Example 2
Input
num1 = 987, num2 = 879, num3 = 798
Output
777
# Example 3
Input
num1 = 1, num2 = 2, num3 = 3
Output
1
Constraints
1 <= num1, num2, num3 <= 9999
Related LeetCode Problems
Practice more problems similar to Find the Key of the Numbers.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.