fork download
  1. using System;
  2. using System.Collections;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var str="2017991";
  10. var n=2;
  11. Console.WriteLine(
  12. String.Join("/",
  13. Enumerable.Range(0, (str.Length+n-1) / n -1 )
  14. // .AsParallel()
  15. .Select(i => str.Substring(i * n, n))
  16. .ToArray()
  17. )
  18. );
  19. }
  20. }
Success #stdin #stdout 0.03s 33848KB
stdin
Standard input is empty
stdout
20/17/99