#K60432. Filter Numbers Above Threshold

    ID: 31085 Type: Default 1000ms 256MiB

Filter Numbers Above Threshold

Filter Numbers Above Threshold

Given a list of integers and an integer threshold, your task is to filter out and output the numbers that are strictly greater than the threshold. In other words, implement a function \(f(\text{numbers},\ \text{threshold})\) that returns a list of all numbers \(x\) such that \(x > \text{threshold}\).

For example, if the input list is [1, 2, 3, 4, 5] and the threshold is 3, the expected output is [4, 5].

inputFormat

The input is given via standard input (stdin) in the following format:

  • The first line contains a single integer \(n\) denoting the number of elements in the list.
  • The second line contains \(n\) space-separated integers.
  • The third line contains a single integer representing the threshold.

outputFormat

Print to standard output (stdout) the numbers that are greater than the threshold, in the same order as they appear in the list, separated by a single space. If no such number exists, output an empty line.

## sample
5
1 2 3 4 5
3
4 5

</p>