Tap here to switch tabs
Problem
Submissions

Problem: Smallest Greater Multiple Made of Two Digits

Try to solve the Smallest Greater Multiple Made of Two Digits problem.

Statement

Given three integers k, digit1, and digit2, find the smallest integer strictly greater than k that is a multiple of k and whose decimal representation consists only of the digits digit1 and digit2.

Return this integer, or return −1-1 if no such integer exists.

Constraints:

  • 1≤1 \leq k ≤1000\leq 1000

  • 0≤0 \leq digit1 ≤9\leq 9

  • 0≤0 \leq digit2 ≤9\leq 9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Smallest Greater Multiple Made of Two Digits

Try to solve the Smallest Greater Multiple Made of Two Digits problem.

Statement

Given three integers k, digit1, and digit2, find the smallest integer strictly greater than k that is a multiple of k and whose decimal representation consists only of the digits digit1 and digit2.

Return this integer, or return −1-1 if no such integer exists.

Constraints:

  • 1≤1 \leq k ≤1000\leq 1000

  • 0≤0 \leq digit1 ≤9\leq 9

  • 0≤0 \leq digit2 ≤9\leq 9