Tap here to switch tabs
Problem
Submissions

Problem: Count Distinct Integers After Removing Zeros

Try to solve the Count Distinct Integers After Removing Zeros problem.

Statement

Given a positive integer n, consider each integer from 11 to n. For every integer, remove all occurrences of the digit 00 from its decimal representation to form a new positive integer.

Return the count of distinct integers formed after applying this process to all integers from 11 to n.

Constraints:

  • 1≤1 \le n ≤1015\le 10^{15}

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Distinct Integers After Removing Zeros

Try to solve the Count Distinct Integers After Removing Zeros problem.

Statement

Given a positive integer n, consider each integer from 11 to n. For every integer, remove all occurrences of the digit 00 from its decimal representation to form a new positive integer.

Return the count of distinct integers formed after applying this process to all integers from 11 to n.

Constraints:

  • 1≤1 \le n ≤1015\le 10^{15}