Equal to the last one

Write a program that reads a non-empty sequence of integer numbers, and
tells how many of them are equal to the last one.

Input

Input consists of a natural number n > 0, followed by n integer numbers.

Output

Print the number of elements that are equal to the last one, this one
excluded.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:08:40.960Z

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