Validate if a given string is numeric.

Some examples:

  • "0" => true
  • " 0.1 " => true
  • "abc" => false
  • "1 a" => false
  • "2e10" => true
  • "1 2"=>false // number not separated by space

Input Format

First Line Contain Number of testcase T. Following T line Each Line contain String s. String may be contain a space.

Constraints

1<=T<= 15. S will contain a numeric,alphanumeric,space,dot. if S contain a number then range will be -10^10 to 10^10

Output Format

output Contain a boolean value for each testcase. print true for valid number.otherwise print false

Sample Input 0

5
0
0.1
abc
1 a
2e10

Sample Output 0

true
true
false
false
true

Sample Input 1

5
ab
12
12.456
1.e2
12.e.10

Sample Output 1

false
true
true
true
false
Line: 1 Col: 1
  1. Challenge Walkthrough
    Let's walk through this sample challenge and explore the features of the code editor.1 of 6
  2. Review the problem statement
    Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
  3. Choose a language
    Select the language you wish to use to solve this challenge.3 of 6
  4. Enter your code
    Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
  5. Test your code
    You can compile your code and test it for errors and accuracy before submitting.5 of 6
  6. Submit to see results
    When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
  1. Check your score