Histogram by the Hundreds

Write a program that reads a sequence of nonnegative integers and reports the histogram by the hundreds: write out how many numbers were between 0 and 99, how many between 100 and 199, how many between 200 and 299, and so on.

Input

The data sequence is to be provided completely in a single line, with spaces separating the consecutive numbers.

Output

For each interval [N,M][N, M], where NN is a multiple of 100 and M=N+99M = N + 99, such that some value in the input sequence belongs to the interval, write a line reporting the interval (with its square brackets and its comma and space), immediately followed by a colon and a space, and then the quantity of numbers in the input falling within that interval. The intervals must be ordered according to their left endpoint NN.

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T17:16:30.257Z

© Jutge.org, 2006–2026.
https://jutge.org