leetcode.cn 2026-12-01
🟡1201.ugly-number-iii
🏷️ Tags
#math #binary_search #combinatorics #greatest_common_divisor #number_theory #inclusion_exclusion_principle #euclidean_algorithm #least_common_multiple
🟡1201.ugly-number-iii
🏷️ Tags
#math #binary_search #combinatorics #greatest_common_divisor #number_theory #inclusion_exclusion_principle #euclidean_algorithm #least_common_multiple
Telegraph
ugly-number-iii
丑数是可以被 a 或 b 或 c 整除的 正整数 。 给你四个整数:n 、a 、b 、c ,请你设计一个算法来找出第 n 个丑数。 示例 1: 输入:n = 3, a = 2, b = 3, c = 5 输出:4 解释:丑数序列为 2, 3, 4, 5, 6, 8, 9, 10... 其中第 3 个是 4。 示例 2: 输入:n = 4, a = 2, b = 3, c = 4 输出:6 解释:丑数序列为 2, 3, 4, 6, 8, 9, 10, 12... 其中第 4 个是 6。 示例 3: 输入:n…
leetcode.com 2026-12-01
🟡1201.ugly-number-iii
🏷️ Tags
#math #binary_search #combinatorics #greatest_common_divisor #number_theory #inclusion_exclusion_principle #euclidean_algorithm #least_common_multiple
🟡1201.ugly-number-iii
🏷️ Tags
#math #binary_search #combinatorics #greatest_common_divisor #number_theory #inclusion_exclusion_principle #euclidean_algorithm #least_common_multiple
Telegraph
ugly-number-iii
An ugly number is a positive integer that is divisible by a, b, or c. Given four integers n, a, b, and c, return the nth ugly number. Example 1: Input: n = 3, a = 2, b = 3, c = 5 Output: 4 Explanation: The ugly numbers are 2, 3, 4, 5, 6, 8, 9, 10... The…