fork download
  1. using System.Text.RegularExpressions;
  2. using System;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. String s = "99";
  9. if (Regex.IsMatch(s, @"^(?:100|[1-9]?[0-9])$")) {
  10. Console.WriteLine("Correct");
  11. }
  12. else {
  13. Console.WriteLine("Wrong");
  14. }
  15. }
  16.  
  17. }
Success #stdin #stdout 0.06s 34024KB
stdin
Standard input is empty
stdout
Correct