Tap here to switch tabs
Problem
Submissions

Problem: Count Commas in Range

Try to solve the Count Commas in Range problem.

Statement

Given an integer n, return the total number of commas used when writing every integer from 11 to n inclusive in standard decimal notation with digit grouping.

In standard decimal notation, commas are placed between digits to group them in sets of three, starting from the right.

Constraints:

  • 1≤1 \le n ≤105\le 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Commas in Range

Try to solve the Count Commas in Range problem.

Statement

Given an integer n, return the total number of commas used when writing every integer from 11 to n inclusive in standard decimal notation with digit grouping.

In standard decimal notation, commas are placed between digits to group them in sets of three, starting from the right.

Constraints:

  • 1≤1 \le n ≤105\le 10^5