1999. Smallest Greater Multiple Made of Two Digits
https://leetcode.com/problems/smallest-greater-multiple-made-of-two-digits
Description
Given three integers, k
, digit1
, and digit2
, you want to find the smallest integer that is:
Larger than
k
,A multiple of
k
, andComprised of only the digits
digit1
and/ordigit2
.
Return the smallest such integer. If no such integer exists or the integer exceeds the limit of a signed 32-bit integer (231 - 1
), return -1
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= k <= 1000
0 <= digit1 <= 9
0 <= digit2 <= 9
ac
Last updated