fork download
  1. // your code goes here
  2.  
  3. var str = '111,222,333,444,555,666,777,888,999';
  4.  
  5. var test = str.split( "," );
  6.  
  7. var str_count = 0;
  8. for (i=0;i<test.length;i++){
  9. str_count += test[i].length;
  10. if (str_count > 20){
  11. print (test[i]);
  12. }
  13. print (test[i]);
  14. }
  15.  
Success #stdin #stdout 0.02s 10816KB
stdin
Standard input is empty
stdout
111
222
333
444
555
666
777
777
888
888
999
999