Equal digits

Write a program that reads a sequence of lines, each one with one or
more natural numbers and, for each line, if all its numbers share a
single digit, tell so; otherwise, print how many numbers consist of a
single digit.

Input

Input has several lines. Each line starts with a strictly positive
natural number n, followed by n natural numbers.

Output

For each line of the input, if all its numbers share a single digit,
tell so. Otherwise, print how many numbers of the line consist of a
single digit. Follow the format of the example.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:11:09.021Z

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