fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // your code goes here
  8. String desc = "Hello World A12B1";
  9. String[] arrDesc = desc.Split(' ');
  10. foreach (String s in arrDesc)
  11. {
  12. int count = 0;
  13. int i = 0;
  14. while(i<s.Length)
  15. {
  16. //Console.WriteLine(i);
  17. if (Char.IsDigit(s[i]))
  18. {
  19. while(i < s.Length && Char.IsDigit(s[i]))
  20. {
  21. i++;
  22. count++;
  23. }
  24. if (count == 10 || count == 11)
  25. {
  26. Console.WriteLine("True");
  27. }
  28. //Console.WriteLine(i);
  29. count = 0;
  30. }
  31. else
  32. {
  33. i++;
  34. }
  35. }
  36. }
  37. Console.WriteLine("False");
  38. }
  39. }
Success #stdin #stdout 0.02s 22428KB
stdin
Standard input is empty
stdout
False