38
\$\begingroup\$

Without taking any input, output this exact text:

 A B A C B A D C B A E D C B A F E D C B A G F E D C B A H G F E D C B A I H G F E D C B A J I H G F E D C B A K J I H G F E D C B A L K J I H G F E D C B A M L K J I H G F E D C B A N M L K J I H G F E D C B A O N M L K J I H G F E D C B A P O N M L K J I H G F E D C B A Q P O N M L K J I H G F E D C B A R Q P O N M L K J I H G F E D C B A S R Q P O N M L K J I H G F E D C B A T S R Q P O N M L K J I H G F E D C B A U T S R Q P O N M L K J I H G F E D C B A V U T S R Q P O N M L K J I H G F E D C B A W V U T S R Q P O N M L K J I H G F E D C B A X W V U T S R Q P O N M L K J I H G F E D C B A Y X W V U T S R Q P O N M L K J I H G F E D C B A Z Y X W V U T S R Q P O N M L K J I H G F E D C B A 

Rules

  • Output can be given by any convenient method.
  • You can print it to STDOUT or return it as a function result.
  • Either a full program or a function are acceptable.
  • A single trailing newline is acceptable, but no other formatting changes are allowed.
  • Capital letters are required.
  • Standard loopholes are forbidden.
  • This is so all usual golfing rules apply, and the shortest code (in bytes) wins.
\$\endgroup\$
6
  • 2
    \$\begingroup\$ A single trailing newline is acceptable, but no other formatting changes are allowed. So a trailing space on each line would not be permitted? \$\endgroup\$ Commented Oct 25, 2019 at 18:04
  • 2
    \$\begingroup\$ @DJMcMayhem Correct - no trailing spaces. Darn that rules out [char][space] times length, doesn't it? ;-) \$\endgroup\$ Commented Oct 25, 2019 at 18:05
  • \$\begingroup\$ Can we return a list of strings? \$\endgroup\$ Commented Oct 25, 2019 at 18:41
  • 2
    \$\begingroup\$ @NickKennedy Yes, that's fine. \$\endgroup\$ Commented Oct 25, 2019 at 18:47
  • 1
    \$\begingroup\$ I like the 3d bump effect around the J. \$\endgroup\$ Commented Oct 27, 2019 at 13:22

72 Answers 72

1
\$\begingroup\$

Pyth, 20 bytes

VlGp*dt-lGNjdr_<GhN1 

Pretty happy with this, since it's my first Pyth answer. Probably can be golfed a lot

Explanation

VlG for N in range(26) p*dt-lGN 26-N spaces outputted <GhN First N alphabet characters _ Reversed r Capitalised j 1 Joined with spaces (space after each character) 

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Python3, 91 bytes

for _ in range(26):print(f'{" ".join([*map(chr,range(65,91))][0:_+1][::-1]):^52}'.rstrip()) 

Try it online!

-1 byte thanks to @cairdcoinheringaahing

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Welcome to the site! Just as a start, there are a few quick golfs that you can do, such as removing the space after the colon. I'd recommend linking to an online testing environment, such as Try it online!, so that others can verify and help you golf your solution \$\endgroup\$ Commented Oct 25, 2019 at 18:49
  • \$\begingroup\$ @cairdcoinheringaahing Thank you! Nice tips ;) and you just saved me one byte! \$\endgroup\$ Commented Oct 25, 2019 at 18:53
  • 1
    \$\begingroup\$ Your output has trailing spaces from the centering, which this challenge does not allow. \$\endgroup\$ Commented Oct 25, 2019 at 22:13
  • \$\begingroup\$ @xnor Nice catch! Fixed it! \$\endgroup\$ Commented Oct 25, 2019 at 22:34
1
\$\begingroup\$

Icon, 84 bytes

procedure main() s:="";i:=1to 26&s[1:1]:=" "||char(64+i)&write(right(s,25+i))&\z end 

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Red, 76 bytes

a:""repeat n 26[insert a rejoin[sp#"@"+ n]print next pad/left copy a n + 26] 

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Perl 6, 33 bytes

{(' 'Xx(25...0))Z~[\R,] 'A'..'Z'} 

Try it online!

Anonymous code block that returns a list of lines.

Explanation:

{ } # Anonymous code block ' 'Xx # String multiply spaces (25...0) # by the range 25 to 0 ( )Z~ # Zip these indents with [\ ] # The triangular reduced R, # Reversed list concatenation 'A'..'Z' # Of the alphabet 
\$\endgroup\$
1
\$\begingroup\$

C# (Visual C# Interactive Compiler), 81 bytes

var x="A";for(char y='\x41';++y<92;x=y+" "+x){WriteLine(new string(' ',91-y)+x);} 

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Keg 32 31 30 26 25 24 25 bytes (SBCS)

A(\≤|:Z$- ⅍*,:Aɧ∑, ,)⑨ ,) 

Try it online!

Hey, Keg's coming 9th (at the time of writing)! Contains unprintable characters. Uses the 26 byte approach but uses a space converted to a string to pad lines.

Answer History

25 bytes

A(|:Aɧ ⅍!3--*,∑, ,)1+ , 

Try it online!

26 bytes (SBCS)

A(|:Aɧ(!;;-| ,)∑, ,)1+ , 

-4 bytes by using stack mechanics rather than the register

Explained

A(␚|:Aɧ(␚!;;-| ,)∑, ,)1+¶, A #Push "A" onto the stack (␚| #26 times: :Aɧ # Push a generated range from A to the top of stack (␚!;;-| ,) # Space-align the row ∑, ,) # Print each character space seperated 1+ # Increment the top letter by one ¶, # Print a newline 

Substitute for the actual unprintable control key and for a literal newline

30 bytes (SBCS)

A&(|A&:&ɧ(!;-| ,)(, ,)&1+& , 

Explained

A&(␚|A&:&ɧ(␚!;-| ,)(, ,)&1+&¶, A& #Put A in the register (␚| #26 times: A&:&ɧ # Push a generated range from A to the top of stack (␚!;-| ,) # Space-align the row (, ,) # Print each character space seperated &1+& # Increment the top letter by one ¶, # Print a newline 

Substitute for the actual unprintable control key and for a literal newline

31 bytes (SBCS)

A&(\≤|A&:&ɧ(\≤!-| ,)(, ,)&1+& , 

Explained

A&(\≤|A&:&ɧ(\≤!-| ,)(, ,)&1+&¶,) A& #Store A in the register (\≤| #26 times: A&:&ɧ # Push a generated range from A to the top (\≤!-| ,) # Align it using spaces (, ,) # Print the row &1+& # Increment the letter ¶,)# Print a newline (replace ¶ w/ \n) 
\$\endgroup\$
0
1
\$\begingroup\$

J, 31 bytes

(|.@;:inv,~' '#~26-#)\u:65+i.26 

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Julia 1.0, 51 bytes

[' '^i*join(('Z'-i:-1:'B').*' ')*'A' for i=25:-1:0] 

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ 44 bytes \$\endgroup\$ Commented Apr 16, 2021 at 12:15
1
\$\begingroup\$

APL (Dyalog Extended), 22 bytes

(⌽0,⍳25)⌽⌽↑{∊⍺' '⍵}\⎕A 

Try it online!

Output of above function.

Explanation:

  • ⎕A is the uppercase alphabet character vector.
  • {∊⍺' '⍵} is a 1 character shorter version of {⍺,' ',⍵} which puts a space between arguments and .
  • Reducing / this function over ⎕A would result in the uppercase alphabet with spaces between, 'A B C ...'. Scanning \ instead produces a nested vector of all the intermediate results, ('A') ('A B') ('A B C')....
  • Mix turns the nested vector into a matrix, padding rows to equal length with spaces, which is then horizontally mirrored with (the one on the right).
  • To get the final answer we need to rotate the rows (dyadic ) by 25, 24, 23, ... 0 characters.
  • The left argument to the rotation is the sequence 25, 24, 23, ... 0, which is obtained concisely by ⌽0,⍳25.
\$\endgroup\$
1
\$\begingroup\$

Batch, 144 bytes

Abuses token delimiters ([ and ;)

@!! 2>nul||cmd/q/v/c%0&&exit/b set;=for /l %%A in (65 1 90)do set[= %;% ![! %;%![:~,-1!&cmd/cexit %%A&set]=!=exitcodeascii! !]!&echo(![!!]:~,-1! 

Sources

\$\endgroup\$
1
\$\begingroup\$

Deadfish~, 10394 bytes

{i}{i}{i}ii{c}{c}ccccc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}{c}cccc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}{c}ccc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}{c}cc{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}{c}c{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}{c}{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}ccccccccc{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}cccccccc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}ccccccc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}cccccc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}ccccc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}cccc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}ccc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}cc{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}c{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}ii{c}{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iiccccccccc{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iicccccccc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iiccccccc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iicccccc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iiccccc{{i}ddddd}iiic{{d}iiiii}dddc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iicccc{{i}ddddd}iiiic{{d}iiiii}ddddc{{i}ddddd}iiic{{d}iiiii}dddc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iiccc{{i}ddddd}iiiiic{{d}iiiii}dddddc{{i}ddddd}iiiic{{d}iiiii}ddddc{{i}ddddd}iiic{{d}iiiii}dddc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iicc{{i}ddddd}iiiiiic{{d}iiiii}ddddddc{{i}ddddd}iiiiic{{d}iiiii}dddddc{{i}ddddd}iiiic{{d}iiiii}ddddc{{i}ddddd}iiic{{d}iiiii}dddc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{i}{i}iic{{i}dddd}dddc{{d}iiii}iiic{{i}ddddd}iiiiiic{{d}iiiii}ddddddc{{i}ddddd}iiiiic{{d}iiiii}dddddc{{i}ddddd}iiiic{{d}iiiii}ddddc{{i}ddddd}iiic{{d}iiiii}dddc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic{{d}iiiii}dddddc{{i}dd}c{{d}iiii}iic{{i}dddd}dddc{{d}iiii}iiic{{i}ddddd}iiiiiic{{d}iiiii}ddddddc{{i}ddddd}iiiiic{{d}iiiii}dddddc{{i}ddddd}iiiic{{d}iiiii}ddddc{{i}ddddd}iiic{{d}iiiii}dddc{{i}ddddd}iic{{d}iiiii}ddc{{i}ddddd}ic{{d}iiiii}dc{{i}ddddd}c{{d}iiiii}c{{i}ddddd}dc{{d}iiiii}ic{{i}ddddd}ddc{{d}iiiii}iic{{i}ddddd}dddc{{d}iiiii}iiic{{i}dddddd}iiiiiic{{d}iiiiii}ddddddc{{i}dddddd}iiiiic{{d}iiiiii}dddddc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiic{{d}iiiiii}dddc{{i}dddddd}iic{{d}iiiiii}ddc{{i}dddddd}ic{{d}iiiiii}dc{{i}dddddd}c{{d}iiiiii}c{{i}dddddd}dc{{d}iiiiii}ic{{i}dddddd}ddc{{d}iiiiii}iic{{i}dddddd}dddc{{d}iiiiii}iiic{i}{i}{i}iiiiiic{d}{d}{d}ddddddc{i}{i}{i}iiiiic{d}{d}{d}dddddc{i}{i}{i}iiiic{d}{d}{d}ddddc{i}{i}{i}iiic 

Compared to others, terrible!

\$\endgroup\$
1
\$\begingroup\$

R, 52 bytes

write(intToUtf8(outer(26:1,1:26,"<=")*90:65,T),1,26) 

Try it online!

A different and (for now) golfier approach than this or that R answers.

To generate "exact text" as is required in challenges, there are usually two options in R: cat and write. cat is more flexible, as write is actually a wrapper around cat, but the advantage of write is that if you can construct your data in a rectangular (matrix) form, some of the verbosity of cat goes away, for instance, you get a newline without explicitly including it as you do in cat, which will then include an extra separator argument, which is usually undesirable. Since each line of the text here appears to be of variable width, write is not the first thing that comes to mind, and both of the other R answers are quite creative in getting around the shortcomings of cat. In particular, the fill argument is not one I'm familiar with, but will have to keep trying out.

The trick here is that write, like cat, separates elements by spaces. Since every line has the same number of spaces, if we can construct the right matrix of empty strings "" and capital letters, we can just use write to automatically put the spaces where they go.

My first attempt started by constructing the matrix directly:

R, 63 bytes

m=matrix(LETTERS,26,26);m[lower.tri(m)]="";write(m[26:1,],1,26) 

Try it online!

This builds up a matrix of capital letters, then sets the lower triangle to empty strings, and finally flips vertically since write proceeds down the columns.

This is equally as long as Bart-Jan van Rossum's answer; I was going to post it since the approach was different, but when I went to read a comment on another completely unrelated challenge, I thought to try intToUtf8 instead.

Two things make this possible. Typically, intToUtf8 takes a vector of integers and converts them to a single string made up of their utf8 codepoints. There is also an optional argument, usually FALSE that when set to TRUE will instead return a vector of characters of the utf8 codepoints. The other trick is that intToUtf8(0) returns the empty string. So instead of constructing a matrix of "" and LETTERS, I constructed a matrix of codepoints, which ended up (finally) being shorter than the other R answers:

R, 61 bytes

write(intToUtf8((outer(1:26,1:26,"<=")*65:90)[26:1,],T),1,26) 

Try it online!

Luckily, despite intToUtf8 returning a vector, write takes a ncolumns argument to specify how many columns wide it ought to be, which provides enough structure for write to print it correctly.

Finally, there are a couple of inefficient golfs which bring it to its current 52 byte form.

\$\endgroup\$
1
\$\begingroup\$

Brainfuck, 189 bytes

++[[+<]>+>++]<->>+[+[<]>>+<+]>>>-[-[-<]>>+<]>-<++++++++++<<<<<<<<[-[->+>+<<]>[-<+>]>[->>>>>>>.<<<<<<<]>>[->+>+<<]<+[->>>+<<<<+<+>>]<[->>>>-.>>>.<<<<<<<]<[->>+<<]>>>>>[-]<[-<+>]>>>.<<<<<<<<]

Try It Online!

(Using 8-bit wrapping)

I cannot put into words how much I hate this language.

\$\endgroup\$
1
\$\begingroup\$

Zsh, 46 43 bytes

-3 bytes from @pxeger using eval instead of a for loop

eval a={A..Z}'\ $a;echo ${(l:26+i++:)a%?};' 

Try it online!

The eval expands to:

a=A\ $a;echo ${(l:26+i++:)a%?}; a=B\ $a;echo ${(l:26+i++:)a%?}; ... 

Which is the same as the for loop from the second 46-byte solution below:


Originals:

for c ({A..Z})a=($c $a)&&echo ${(l:25-i++:)}$a 

Try it online!

Abuses arrays implicitly joining on spaces. l:expr: pads on the left with spaces until at expr characters wide. Putting parameter expansion flags with no parameter like this causes them to operate on an empty string.


Alternate 46 byte solution, using a string with ${a%postfixremoval} instead. Note that here we increment the padding width to accommodate the growing total string length.

for c ({A..Z})a=$c\ $a&&echo ${(l:26+i++:)a%?} 

Try it online!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ 43: Try it online! \$\endgroup\$ Commented Apr 12, 2021 at 15:04
1
\$\begingroup\$

JavaScript (Node.js),  65  63 bytes

Saved 2 bytes thanks to @l4m2

f=(n=26,s=`A `)=>n--?''.padEnd(n)+s+f(n,Buffer([91-n,32])+s):'' 

Try it online!


JavaScript (Node.js), 79 bytes

More maths, more bytes.

f=(x=y=0)=>y<26?Buffer([x<y+26?y+x++&x>25-y?156-x+y>>1:32:(x=!++y,13)])+f(x):'' 

Try it online!

\$\endgroup\$
1
1
\$\begingroup\$

Vyxal j, 10 bytes

kA¦RvṄøĊøR 

Try it Online!

Very nice

Explained (old)

₄ƛkAẎṘṄ ₄ƛ # over the range [1, 26]: (call each item n) kAẎ # push "ABCDE....XYZ"[0:n] ṘṄ # reverse and join on spaces # the -C flag auto-centers the top of the stack 
\$\endgroup\$
3
1
\$\begingroup\$

☾, 18 characters (45 bytes)

code

26⭥ᴙᐵ⋅𝘀+ABCᴙ􍪴﹕⨝𝘀→☾ 

explanation

\$\endgroup\$
1
\$\begingroup\$

Python 3, 52 bytes

i=26;s='';while i:i-=1;s=chr(90-i)+s;print(i*' ',*s) 

couldn't find anything smaller than this

\$\endgroup\$
1
\$\begingroup\$

OpTeX, 63 bytes

\def~{}\fornum65..90\do{\edef~{\char#1~}\centerline{~}\par}\bye 

OpTeX is a modernized version of plain TeX. As always with TeX, the output is better for code golf with a mono-spaced font. We need \tt (typewriter font) for that, but this adds 3 more bytes.

\tt\def~{}\fornum65..90\do{\edef~{\char#1~}\centerline{~}\par}\bye 

Example

\$\endgroup\$
1
\$\begingroup\$

Vyxal 3, 15 bytes

kAPƛ⇄␣j26nL-␣×p 

returns a list of strings. add }” at the end to pretty-print or use the flag for something in between

Vyxal It Online!

kAPƛ⇄␣j26nL-␣×p­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏⁠‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁢⁢​‎‎⁡⁠⁤⁣‏‏​⁡⁠⁡‌⁢⁣​‎‎⁡⁠⁤⁡‏⁠‎⁡⁠⁤⁢‏‏​⁡⁠⁡‌⁢⁤​‎‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏⁠‎⁡⁠⁣⁣‏⁠‎⁡⁠⁣⁤‏‏​⁡⁠⁡‌­ kA # ‎⁡uppercase alphabet P # ‎⁢prefixes ƛ # ‎⁣map over each ⇄ # ‎⁤reverse ␣j # ‎⁢⁡intersperse spaces p # ‎⁢⁢prepend... ␣× # ‎⁢⁣spaces times... 26nL- # ‎⁢⁤26 - length of slice 💎 

Created with the help of Luminespire.

<script type="vyxal3"> kAPƛ⇄␣j26nL-␣×p}” </script> <script> args=[] </script> <script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>

\$\endgroup\$
1
\$\begingroup\$

Bespoke, 437 bytes

this A-B-C pyramid program is easy,but it is quite involved space it with counter;start off to put it behind by specific integer as loop reaches end,do a at-once way of giving first triangle text extend it as much as rows require;start off as far in series as we were put in spaces,then triangle text;reduce it,counting backward to just nothing end of a row is a designated return of carriage+newline it will put it at origin,starting it 

I wasn't sure exactly what approach to use for this at first.

\$\endgroup\$
0
\$\begingroup\$

Jelly, 16 bytes

L26_⁶x;KU$ ØAÇƤY 

Try it online!

This seems too long for Jelly, despite being terrible at challenges

\$\endgroup\$
0
\$\begingroup\$

Haskell, 63 bytes

[(' '<$[c..'Y'])++foldl(\s->(:' ':s))"A"['B'..c]|c<-['A'..'Z']] 

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Japt, 29 bytes

;1o27@Bt0X)w)ò1)qS)ùS25+X})qR 

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ This can be done in 11 bytes ;) Hint: it involves cumulative reduction. \$\endgroup\$ Commented Oct 26, 2019 at 1:37
  • \$\begingroup\$ @Shaggy Did I get your 11 byte solution? \$\endgroup\$ Commented Oct 26, 2019 at 5:44
  • \$\begingroup\$ Seeing as @EmbodimentofIgnorance got that, you can still golf this one to 17 bytes \$\endgroup\$ Commented Oct 26, 2019 at 9:30
0
\$\begingroup\$

PHP, 59 bytes

for($a=A;$i++<26;)echo str_pad('',26-$i),$s=$a++." $s"," "; 

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Wren, 125 119 bytes

Not very interesting until I read other answers.

for(i in 0..25){ System.write(" "*(25-i)) for(j in 0..i)System.write(" "+String.fromCodePoint(65+i-j)) System.print() } 

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Elixir, 70 bytes

r=90..65;for i<-0..25,do: IO.puts for j<-r,do: 65+i-j>-1&&[j,' ']||' ' 

Try it here

\$\endgroup\$
0
\$\begingroup\$

Javascript ES6, 105 bytes

[..."ZYXWVUTSRQPONMLKJIHGFEDCBA"].forEach((l,i,a)=>console.log(" ".repeat(25-i)+a.slice(25-i).join(" ")))

\$\endgroup\$
0
\$\begingroup\$

sed 4.2.2 (with GNU exec extension), 58 bytes

s/^/bash -c 'echo {Z..A}'/e : s/^( *)\S([^\n]+)/\1\2\n&/ t 

Try it online!


Pure sed 4.2.2, 71 bytes

s/^/ZYXWVUTSRQPONMLKJIHGFEDCBA/ s/\B/ /g : s/^( *)\S([^\n]+)/\1\2\n&/ t 

Try it online!

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.