3345. Smallest Divisible Digit Product I Easy
1/**
2 * [3345] Smallest Divisible Digit Product I
3 *
4 * You are given two integers n and t. Return the smallest number greater than or equal to n such that the product of its digits is divisible by t.
5 *
6 * <strong class="example">Example 1:
7 * <div class="example-block">
8 * Input: <span class="example-io">n = 10, t = 2</span>
9 * Output: <span class="example-io">10</span>
10 * Explanation:
11 * The digit product of 10 is 0, which is divisible by 2, making it the smallest number greater than or equal to 10 that satisfies the condition.
12 * </div>
13 * <strong class="example">Example 2:
14 * <div class="example-block">
15 * Input: <span class="example-io">n = 15, t = 3</span>
16 * Output: <span class="example-io">16</span>
17 * Explanation:
18 * The digit product of 16 is 6, which is divisible by 3, making it the smallest number greater than or equal to 15 that satisfies the condition.
19 * </div>
20 *
21 * Constraints:
22 *
23 * 1 <= n <= 100
24 * 1 <= t <= 10
25 *
26 */
27pub struct Solution {}
28
29// problem: https://leetcode.com/problems/smallest-divisible-digit-product-i/
30// discuss: https://leetcode.com/problems/smallest-divisible-digit-product-i/discuss/?currentPage=1&orderBy=most_votes&query=
31
32// submission codes start here
33
34impl Solution {
35 pub fn smallest_number(n: i32, t: i32) -> i32 {
36 0
37 }
38}
39
40// submission codes end
41
42#[cfg(test)]
43mod tests {
44 use super::*;
45
46 #[test]
47 fn test_3345() {
48 }
49}
50
Back
© 2025 bowen.ge All Rights Reserved.