Extract the integers
Submissions: 1771   Accuracy:

19.01%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a string, the task is to extract all the integers from it.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow.
Each test case contains a string S as input.

Output:
For each test case, print all the integers with one space, if the string does not contain any integers, print "No Integers".

Constraints:
1<=T<=100
1<=S<=105

Example:
Input:
3

geeksforgeeks 12 23 practice
1: Prakhar Agrawal, 2: Manish Kumar Rai, 3: Rishabh Gupta
geeksforgeeks

Output:
12 23
1 2 3
No Integers

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun Tyagi
Author: arun03


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.