fork download
  1. var s = ""
  2. var x = Math.floor((Math.random() * 5));
  3. for (i = 0; i < 40; i++) {
  4. s = s + (x + 1) + " "
  5. x = (x + Math.floor((Math.random() * 4) + 1 )) % 5;
  6. }
  7. print(s)
  8.  
Success #stdin #stdout 0s 105856KB
stdin
Standard input is empty
stdout
1 4 3 2 1 5 4 5 2 1 4 2 4 5 1 4 3 1 4 5 2 1 3 5 2 4 5 3 1 5 3 5 4 5 1 5 3 5 4 2