Km to Go (kmtogo)

352 teams scored 32500 points on this task, for a maximum score of 100, an average score of 92 and a median score of 100.

Highlights

  1. LS Scorza, Cosenza is the institute with the most points (815).
  2. Lombardia is the region with the most points (5130).

Statement

Karcsi is organizing a running race of N kilometers and wants to print large numeric signs on A4 sheets to indicate the remaining distance at each kilometer mark. The signs display the numbers from N to 1, showing the number of kilometers left to the finish line. Each sheet contains exactly one digit, meaning that multi-digit numbers are split across multiple sheets. Karcsi wants to know how many copies of each digit he must print for the race. Write a program to calculate how often each digit (0, 1, …, 9) appears amongst the numbers N, N-1, …, 2, 1.