fork(1) download
  1. ** input 2 times
  2. ** memory layout: nact
  3. n++[n-
  4. >>c,----------[
  5. ** convert character code to number
  6. >t++++++[-<c------>t]<c--
  7. ** add a x10 to c
  8. <a[->c++++++++++<a]
  9. ** move back to a
  10. >c[-<a+>c]
  11. c,----------]
  12. ** move counter
  13. c<<n[->>c+<<n]
  14. n>>cn ( slide )]
  15.  
  16. ** add two numbers
  17. <[-<<+>>]
  18.  
  19. ** divmod loop
  20. ** memory layout: ndrq__
  21. <<n[
  22. ** set 10 to d as a divide number
  23. >d++++++++++<n
  24. ** divmod
  25. n[->-[>+>>]>[+[-<+>]>+>>]<<<<<]
  26. ** clear d
  27. >d[-]
  28. ** increment r
  29. >r+
  30. >qn]
  31.  
  32. ** output loop
  33. ** memory layout: rt
  34. <r[-
  35. ** convert a number to a character code
  36. >t++++++[-<r++++++++>t]
  37. <r.
  38. r<<<r ( slide )]
  39.  
Success #stdin #stdout 0s 1908KB
stdin
4649
893
stdout
5542