This page is still under construction.

Parts of this page are still being built. What you see may change.

Numbers Smaller Than X

Time limit1sMemory limit256 MB

Summary
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. (1≤N,X≤10 0001 \le N, X \le 10\,000)

The second line contains the N integers of the sequence A, separated by spaces. Every integer is at least 1 and at most 10 00010\,000.

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.

Examples8

  1. Example 1

    Input
    10 5
    1 10 4 9 2 3 8 5 7 6
    
    Expected output
    1 4 2 3
    
  2. Example 2

    Input
    1 10000
    1
    
    Expected output
    1
    
  3. Example 3

    Input
    5 2
    1 1 1 1 1
    
    Expected output
    1 1 1 1 1
    
  4. Example 4

    Input
    6 5000
    5000 4999 5001 10000 1 5000
    
    Expected output
    4999 1
    
  5. Example 5

    Input
    5 10000
    10000 9999 10000 1 9999
    
    Expected output
    9999 1 9999
    
  6. Example 6

    Input
    4 3
    10 5 3 2
    
    Expected output
    2
    
  7. Example 7

    Input
    4 3
    2 3 4 10000
    
    Expected output
    2
    
  8. Example 8

    Input
    8 7
    9 6 7 1 7 6 10000 2
    
    Expected output
    6 1 6 2