Tap here to switch tabs
Problem
Submissions

Problem: Numbers With Repeated Digits

Numbers With Repeated Digits asks you to count positive integers from one through n that contain at least one digit appearing more than once.

Statement

Given an integer n, return the count of positive integers in the range [1,n][1, n] that contain at least one repeated digit.

Constraints:

  • 1≤n≤1091 \le n \le 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Numbers With Repeated Digits

Numbers With Repeated Digits asks you to count positive integers from one through n that contain at least one digit appearing more than once.

Statement

Given an integer n, return the count of positive integers in the range [1,n][1, n] that contain at least one repeated digit.

Constraints:

  • 1≤n≤1091 \le n \le 10^9