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

Saved 3 bytes thanks to TessellatingHeckler
Source Link
AdmBorkBork
  • 43.7k
  • 5
  • 107
  • 288

PowerShell, 45(削除) 45 (削除ここまで) 42 bytes

param($a)65..$a|%$args[0]|%{" "*$i+++"$([char]$_) "*$i}

Try it online! Try it online!

Takes input as a literal char, then loops up through the capitals to that point, each iteration prepending the appropriate number of spaces and then the char\space hybrid.

Saved 3 bytes thanks to TessellatingHeckler.

PowerShell, 45 bytes

param($a)65..$a|%{" "*$i+++"$([char]$_) "*$i}

Try it online!

Takes input as a literal char, then loops up through the capitals to that point, each iteration prepending the appropriate number of spaces and then the char\space hybrid.

PowerShell, (削除) 45 (削除ここまで) 42 bytes

65..$args[0]|%{" "*$i+++"$([char]$_) "*$i}

Try it online!

Takes input as a literal char, then loops up through the capitals to that point, each iteration prepending the appropriate number of spaces and then the char\space hybrid.

Saved 3 bytes thanks to TessellatingHeckler.

Source Link
AdmBorkBork
  • 43.7k
  • 5
  • 107
  • 288

PowerShell, 45 bytes

param($a)65..$a|%{" "*$i+++"$([char]$_) "*$i}

Try it online!

Takes input as a literal char, then loops up through the capitals to that point, each iteration prepending the appropriate number of spaces and then the char\space hybrid.

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