Z56

Kth Smallest Number in Multiplication Table

Staff / Principal Engineer
Target Time: 40 - 50 Minutes
Type: NUMERIC

Problem Statement & Objective

Nearly everyone has used the Multiplication Table. Given m, n, and k, return the kth smallest number in the m x n multiplication table.

Function Signature (Python)

find_kth_number_multiplication_table(m: int, n: int, k: int) -> int

Input & Output Contract

Output Rule:k'ıncı en küçük sayı tam sayısı.

System Constraints

1 <= m, n <= 3 * 10^4
1 <= k <= m * n

Example Execution Walkthrough

m = 3, n = 3, k = 5
tablo: [1,2,3, 2,4,6, 3,6,9] -> sıralı: [1, 2, 2, 3, 3, 4, 6, 6, 9] -> 5. eleman 3

Example Test Scenarios (3)

Example 1
Input:[3,3,5]
Expected Output:3
Example 2: Son Eleman
Input:[2,3,6]
Expected Output:6
Example 3: 1x1
Input:[1,1,1]
Expected Output:1
Loading Python Editor...
Input Parameters
[
  3,
  3,
  5
]
Expected Output
3