fork(2) download
  1. using System;
  2. using System.Text;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string bign = "11212131342354364364656121";
  9. StringBuilder sb = new StringBuilder(bign.Length * 4 / 3);
  10. int jj = bign.Length % 3;
  11.  
  12. sb.Append(bign[0]);
  13. for(int i = 1;i<bign.Length;i++) {
  14. if(i % 3 == jj) {
  15. sb.Append(",");
  16. }
  17. sb.Append(bign[i]);
  18. }
  19.  
  20. Console.WriteLine(sb.ToString());
  21. }
  22. }
Success #stdin #stdout 0s 131648KB
stdin
Standard input is empty
stdout
11,212,131,342,354,364,364,656,121