Skip to main content
added 60 characters in body
Source Link
J.Doe
  • 2.6k
  • 11
  • 15

R, 6255 bytes

Assuming integers are all under 1e10, which is larger than the maximum 32 bit integer anyway...

function(n,p=10^(nchar(n)9:0),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!Try it online!

R, 62 bytes

function(n,p=10^(nchar(n):0),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!

R, 55 bytes

Assuming integers are all under 1e10, which is larger than the maximum 32 bit integer anyway...

function(n,p=10^(9:0),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!

deleted 2 characters in body
Source Link
J.Doe
  • 2.6k
  • 11
  • 15

R, 6462 bytes

function(n,p=10^(nchar(n):1-10),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!Try it online!

R, 64 bytes

function(n,p=10^(nchar(n):1-1),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!

R, 62 bytes

function(n,p=10^(nchar(n):0),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!

Source Link
J.Doe
  • 2.6k
  • 11
  • 15

R, 64 bytes

function(n,p=10^(nchar(n):1-1),x=p*n%/%p%%10)cat(x[!!x],sep='+')

Try it online!