Tap here to switch tabs
Problem
Submissions

Problem: Count Commas in Range II

Try to solve the Count Commas in Range II problem.

Statement

Given a positive integer n, return the total number of commas used when writing all integers from 11 to n inclusive in standard formatting, where a comma separates every group of 33 digits starting from the right.

Constraints:

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

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Commas in Range II

Try to solve the Count Commas in Range II problem.

Statement

Given a positive integer n, return the total number of commas used when writing all integers from 11 to n inclusive in standard formatting, where a comma separates every group of 33 digits starting from the right.

Constraints:

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