Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Mathematica, 71 bytes

Mathematica, 71 bytes

""<>s[[i]]~t~If[i~Mod~#2==1,#2,1]~(t=Table)~{i,Tr[1^(s=Characters@#)]}&

Try it online!

saved -2 bytes by listening to user202729

#Mathematica, 71 bytes

""<>s[[i]]~t~If[i~Mod~#2==1,#2,1]~(t=Table)~{i,Tr[1^(s=Characters@#)]}&

Try it online!

saved -2 bytes by listening to user202729

Mathematica, 71 bytes

""<>s[[i]]~t~If[i~Mod~#2==1,#2,1]~(t=Table)~{i,Tr[1^(s=Characters@#)]}&

Try it online!

saved -2 bytes by listening to user202729

deleted 2 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

#Mathematica, 7271 bytes

""<>(t=Table)[s[[i]]~t~If[i~Mod~#2==1""<>s[[i]]~t~If[i~Mod~#2==1,#2,1],1]~(t=Table)~{i,Length[s=Characters@#]Tr[1^(s=Characters@#)]}]&&

Try it online! Try it online!

saved -2 bytes by listening to user202729

#Mathematica, 72 bytes

""<>(t=Table)[s[[i]]~t~If[i~Mod~#2==1,#2,1],{i,Length[s=Characters@#]}]&

Try it online!

saved -2 bytes by listening to user202729

#Mathematica, 71 bytes

""<>s[[i]]~t~If[i~Mod~#2==1,#2,1]~(t=Table)~{i,Tr[1^(s=Characters@#)]}&

Try it online!

saved -2 bytes by listening to user202729

added 43 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

#Mathematica, 7472 bytes

""<>(t=Table)[#~StringTake~{i}~t~If[i~Mod~#2==1[s[[i]]~t~If[i~Mod~#2==1,#2,1],{i,StringLength@#Length[s=Characters@#]}]&

Try it online! Try it online!

saved -2 bytes by listening to user202729

#Mathematica, 74 bytes

""<>(t=Table)[#~StringTake~{i}~t~If[i~Mod~#2==1,#2,1],{i,StringLength@#}]&

Try it online!

#Mathematica, 72 bytes

""<>(t=Table)[s[[i]]~t~If[i~Mod~#2==1,#2,1],{i,Length[s=Characters@#]}]&

Try it online!

saved -2 bytes by listening to user202729

added 128 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87
Loading
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87
Loading

AltStyle によって変換されたページ (->オリジナル) /