Skip to main content
10 of 10
added 214 characters in body
sergiol
  • 3.5k
  • 1
  • 15
  • 31

Very naïve approach.

Tcl, 100 bytes

time {puts [format %[incr i]s \ ][string repe [format %c\  [expr $i+64]] $i]} [expr [scan $c %c]-64]

Try it online!

# [Tcl], 106 bytes
set i 0;while \$i<[scan $c %c]-64 {puts [format %$i.s \ ][string repe [format %2c [expr $i+65]] [incr i]]}

Try it online!

---

Below approahes do not have a leading space

Tcl, 107 bytes

set i 0;while \$i<[scan $c %c]-64 {puts [format %$i.s \ ][string repe [format %c [expr $i+65]]\  [incr i]]}

[Try it online!][TIO-j6r5o6wd] Tcl: http://tcl.tk/ [TIO-j6r5o6wd]: https://tio.run/##RcoxDsIwDAXQq/whnRCIAbrASXA8VMYUSyVEsRFIiLMHNub3QpY@azg8zlYg3TVg2B6eV1sUOdmRXKaCJBiE1@MO7/r4fbrc220KDMk2jgwmj2ZlRtOqfxWQvmpDstW4Z84AWZEGY/70fvoC "Tcl – Try It Online"

Tcl, 109 bytes

set i 0;time {puts [format %$i.s \ ][string repe [format %c [expr $i+65]]\  [incr i]]} [expr [scan $c %c]-64]

Try it online!

Tcl, 111 bytes

set i 0;time {puts [string repe \  $i][string repe [format %c [expr $i+65]]\  [incr i]]} [expr [scan $c %c]-64]

Try it online!

sergiol
  • 3.5k
  • 1
  • 15
  • 31