Skip to main content
added 18 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

C (gcc), 38 36 3635 bytes

fm;f(n){n=n*(exp10n*=m=exp10(n=log10m=log10(n)+1)-1)/9;}

Try it online!Try it online!

Saved 22 3 bytes thanks to tsh!!!

C (gcc), 38 36 bytes

f(n){n=n*(exp10(n=log10(n)+1)-1)/9;}

Try it online!

Saved 2 bytes thanks to tsh!!!

C (gcc), 38 36 35 bytes

m;f(n){n*=m=exp10(m=log10(n)+1)/9;}

Try it online!

Saved 2 3 bytes thanks to tsh!!!

added 116 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

C (gcc), 3838 36 bytes

f(n){n*=n=n*(exp10((int)log10n=log10(n)+1)-1)/9;}

Try it online!Try it online!

Saved 2 bytes thanks to tsh!!!

C (gcc), 38 bytes

f(n){n*=(exp10((int)log10(n)+1)-1)/9;}

Try it online!

C (gcc), 38 36 bytes

f(n){n=n*(exp10(n=log10(n)+1)-1)/9;}

Try it online!

Saved 2 bytes thanks to tsh!!!

Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

C (gcc), 38 bytes

f(n){n*=(exp10((int)log10(n)+1)-1)/9;}

Try it online!