#C1519. Special Values
Special Values
Special Values
Given a list of integers and an integer \(k\), your task is to find all the integers that appear exactly \(k\) times in the list. For each integer \(x\), define its frequency as \(f(x)\). You are required to output all \(x\) such that \(f(x)=k\), in increasing order.
If no integer satisfies the condition, output an empty line.
inputFormat
The input is given via standard input (stdin) in the following format:
- The first line contains an integer \(n\), the number of elements in the list.
- The second line contains \(n\) space-separated integers.
- The third line contains an integer \(k\).
outputFormat
Output the integers that appear exactly \(k\) times in the list in increasing order, separated by a single space. If no such integer exists, output an empty line.
## sample12
4 5 6 7 7 4 4 8 6 6 6 5
2
5 7
</p>