fork(3) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int count = 0;
  8. string num;
  9. for (int i = 2; i < 1000000; i++)
  10. {
  11. num = i.ToString();
  12. if (num.Contains("2")) { count++; }
  13. }
  14. Console.WriteLine(count);
  15. }
  16. }
Success #stdin #stdout 0.31s 34080KB
stdin
Standard input is empty
stdout
468559