Numbers Smaller Than X
Time limit1sMemory limit256 MB
Print the elements of the sequence that are smaller than X in their original order.
- Level
Easy1 of 10
- Topics
- Array
- Solved
- No attempts yet
Problem
You are given a sequence A of N integers and an integer X. Write a program that prints every number in A that is smaller than X.
Input
The first line contains N and X, separated by a space. ()
The second line contains the N integers of the sequence A, separated by spaces. Every integer is at least 1 and at most .
Output
Print the numbers smaller than X on one line, in the order they were read, separated by single spaces. At least one number smaller than X exists.