Advertisement
sci4me

jaja lang collatz

Jul 28th, 2019
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. [$2%0=$[^2/^]?~[3*1+]?]collatz:
  2. [n:0s:[n;1=~][n;collatz;!n:s;1+s:]#s;]steps:
  3.  
  4. 1
  5. [$1000000<][
  6. $
  7. $print;!" = "print;!
  8. steps;!
  9. println;!
  10.  
  11. 1+
  12. ]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement