fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. class MainClass
  5. {
  6. public static void Main(string[] args)
  7. {
  8. Regex r = new Regex("^(([-+]?[0-9]+)|(N/A))$");
  9. string line;
  10. while(!String.IsNullOrEmpty(line = Console.ReadLine()))
  11. {
  12. Console.WriteLine("{0}: {1}", line, r.Match(line).Success);
  13. }
  14. }
  15. }
  16.  
Success #stdin #stdout 0.07s 38120KB
stdin
alma
++1
-314
42
N/A
stdout
alma: False
++1: False
-314: True
42: True
N/A: True