#C2034. Filter Long Words
Filter Long Words
Filter Long Words
You are given a sentence consisting of words separated by spaces, and an integer \(n\). Your task is to print all words from the sentence whose length is greater than or equal to \(n\). A word is defined as a sequence of non-space characters.
If no word meets the condition, print an empty line.
Example: For the input "The quick brown fox jumps over the lazy dog" and \(n=4\), the output should be "quick brown jumps over lazy".
inputFormat
The input consists of two lines. The first line is a sentence (which may contain spaces). The second line is an integer (n) representing the minimum length a word must have to be included in the output.
outputFormat
Output a single line containing the words that have lengths greater than or equal to (n), separated by a space. If no words satisfy the condition, output an empty line.## sample
The quick brown fox jumps over the lazy dog
4
quick brown jumps over lazy