Tap here to switch tabs
Problem
Submissions

Problem: Find the Key of the Numbers

med
30 min
Try to solve the Find the Key of the Numbers problem.

Statement

You are given three positive integers num1, num2, and num3.

Pad each number with leading zeros so that each number consists of exactly 44 digits.

The key is a 44 digit number constructed by taking the minimum digit at each position among the three padded numbers:
The iextthi^{ ext{th}} digit of key (1≤i≤41 \leq i \leq 4) is the minimum among the iextthi^{ ext{th}} digits of num1, num2, and num3.

Return the key as an integer.

Constraints:

  • 1≤1 \leq num1, num2, num3 ≤9999\leq 9999

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find the Key of the Numbers

med
30 min
Try to solve the Find the Key of the Numbers problem.

Statement

You are given three positive integers num1, num2, and num3.

Pad each number with leading zeros so that each number consists of exactly 44 digits.

The key is a 44 digit number constructed by taking the minimum digit at each position among the three padded numbers:
The iextthi^{ ext{th}} digit of key (1≤i≤41 \leq i \leq 4) is the minimum among the iextthi^{ ext{th}} digits of num1, num2, and num3.

Return the key as an integer.

Constraints:

  • 1≤1 \leq num1, num2, num3 ≤9999\leq 9999