Tap here to switch tabs
Problem
Submissions

Problem: Smallest Integer Divisible by K

med
30 min
Try to solve the Smallest Integer Divisible by K problem.

Statement

Given a positive integer k, determine the length of the smallest positive integer n such that n is divisible by k and consists exclusively of the digit 11.

Return the length of n. If no such integer exists, return −1-1.

Constraints:

  • 1≤k≤1051 \le k \le 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Smallest Integer Divisible by K

med
30 min
Try to solve the Smallest Integer Divisible by K problem.

Statement

Given a positive integer k, determine the length of the smallest positive integer n such that n is divisible by k and consists exclusively of the digit 11.

Return the length of n. If no such integer exists, return −1-1.

Constraints:

  • 1≤k≤1051 \le k \le 10^5