64
\$\begingroup\$

Inspired by George Gibson's Print a Tabula Recta.

You are to print/output this exact text:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ

(Yes, I typed that by hand)

You are allowed to use all lowercase instead of all uppercase.

However, your choice of case must be consistent throughout the whole text.

Rules/Requirements

  • Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.
  • If it is possible, provide a link to a site where your program can be tested.
  • Your program must not write anything to STDERR.
  • Standard Loopholes are forbidden.
  • Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

# Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

# Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the leaderboard snippet:

# [><>](http://esolangs.org/wiki/Fish), 121 bytes

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87064; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });  
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];
  
  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
    });
    
    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });
    
  });
  
  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;
    
    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/<a/.test(lang)) lang = jQuery(lang).text();
    
    languages[lang] = languages[lang] || {lang: a.language, user: a.user, size: a.size, link: a.link};
  });

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);

  langs.sort(function (a, b) {
    if (a.lang > b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}
body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">
<div id="answer-list">
  <h2>Leaderboard</h2>
  <table class="answer-list">
    <thead>
      <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr>
    </thead>
    <tbody id="answers">

    </tbody>
  </table>
</div>
<div id="language-list">
  <h2>Winners by Language</h2>
  <table class="language-list">
    <thead>
      <tr><td>Language</td><td>User</td><td>Score</td></tr>
    </thead>
    <tbody id="languages">

    </tbody>
  </table>
</div>
<table style="display: none">
  <tbody id="answer-template">
    <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
</table>
<table style="display: none">
  <tbody id="language-template">
    <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
</table>

\$\endgroup\$
  • 1
    \$\begingroup\$ Related. \$\endgroup\$ – Leaky Nun Jul 31 '16 at 14:03
  • 5
    \$\begingroup\$ Can the output (as the return value from a function) be an array of lines? \$\endgroup\$ – Doorknob Jul 31 '16 at 14:55
  • \$\begingroup\$ @Doorknob I would say no. \$\endgroup\$ – Leaky Nun Jul 31 '16 at 14:56
  • \$\begingroup\$ @GeorgeGibson Yes. \$\endgroup\$ – Leaky Nun Jul 31 '16 at 17:36
  • \$\begingroup\$ @LeakyNun Is a trailing newline allowed? \$\endgroup\$ – Jakube Aug 1 '16 at 10:58

111 Answers 111

0
\$\begingroup\$

Pyth, 16 bytes

I'm guessing I'm doing it entirely wrong.

VlG=H>rG1N+*hHNH

Explanation:

VlG       For every letter in the alphabet.
 =H>rG1N  Get every entry past N in the uppercase alphabet (rG1) and store it in H.
 +*hHNH   Output the first letter times the iteration appended to the truncated uppercase alphabet.

Try it online!

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

Bubblegum, 118 bytes

00000000: e002 bc00 6c5d 0020 9084 76ba 8a75 cfb4  ....l]. ..v..u..
00000010: 0db2 e89f 1387 f805 577d ecad ee74 7800  ........W}...tx.
00000020: eec1 2f25 c599 ffad a853 3436 8feb d31b  ../%.....S46....
00000030: 82d8 8903 257e e382 db1a 762d 7165 8aff  ....%~....v-qe..
00000040: b5a1 0ce7 aef8 6f11 df37 a113 cae8 1bf5  ......o..7......
00000050: cb63 3fc8 6759 ad3c 9623 3ff4 eec3 aa59  .c?.gY.<.#?....Y
00000060: 0467 2b17 046c 0fa7 33a2 03aa d932 36b7  .g+..l..3....26.
00000070: 26fe c600 0d0a                           &.....

Try it online!

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

Thotpatrol, 907 bytes

📡JACKING IN📡
💦DM💦 THAUGHTY ALLIE 
💦DM💦 THAUGHTY LAURA 
💦DM💦 THOTTY KATY 
💦DM💦 THOTTY MARINA
💦DM💦 THAUGHTY KATE 
ALLIE 🍑📧 ©ABCDEFGHIJKLMNOPQRSTUVWXZY©
KATY  🍑📧 ™0™
MARINA 🍑📧 ™0™
❤PRIME ASSETS❤ MARINA 🤛 ™25™
LAURA 🍑📧 ©©
KATY  🍑📧 ™0™
❤PRIME ASSETS❤ KATY 🤛 ™25™
😎BRIEF😎 KATY 👈 MARINA
KATE 🍑📧 ALLIE 🔎 MARINA
LAURA 🍑📧 LAURA REDACTED KATE
🔇DEBRIEF🔇
😎BRIEF😎 KATY 🤜 MARINA
KATE 🍑📧 ALLIE 🔎 KATY
LAURA 🍑📧 LAURA REDACTED KATE
🔇DEBRIEF🔇
KATY 🍑📧 KATY 👏 ™1™
🎧INTERCEPT MALIGNANT COMMUNICATIONS🎧
🕵 🍑📧 LAURA REDACTED ©
©
MARINA 🍑📧 MARINA 👏 ™1™
🎧INTERCEPT MALIGNANT COMMUNICATIONS🎧
NAUGHTY THAUGHTY ALLIE
NAUGHTY THOTTY KATY
NAUGHTY THAUGHTY KATE
NAUGHTY THOTTY MARINA
🇺🇸REPORT UNPATRIOTIC ACTIVITY🇺🇸

I challenge others to optimize this further. Thotpatrol is not an efficiency-friendly language.

Link to interpreter: https://github.com/MindyGalveston/thotpatrol-

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

K (oK), 21 19 bytes

Solution:

`0:`c$a|/:a:65+!26;

Try it online!

Explanation:

K port of my q/kdb+ answer.

`0:`c$a|/:a:65+!26; / solution
`0:               ; / write to stdout and swallow return value
               !26  / til 26, range 0..25
            65+     / add 65 (vectorised), ASCII A = 65
          a:        / save in variable a
      a|/:          / a max (&) each-right (/:) a
   `c$              / cast to string
\$\endgroup\$
0
\$\begingroup\$

Thotpatrol, 576 bytes

📡JACKING IN📡
💦DM💦 THAUGHTY AI
AI 🍑📧 ©ABCDEFGHIJKLMNOPQRSTUVWXYZ©
💦DM💦 THOTTY AN
💦DM💦 THOTTY FE
FE 🍑📧 ™0™
❤PRIME ASSETS❤ FE 🤛 ™25™
AN 🍑📧 ™0™
❤PRIME ASSETS❤ AN 🤛 ™25™
😎BRIEF😎 AN 🤛 FE
🕵 🍑📧 AI 🔎 FE
🔇DEBRIEF🔇
😎BRIEF😎 AN 👉 FE
🕵 🍑📧 AI 🔎 AN
🔇DEBRIEF🔇
AN 🍑📧 AN 👏 ™1™
🎧INTERCEPT MALIGNANT COMMUNICATIONS🎧
🕵 🍑📧 ©
©
FE 🍑📧 FE 👏 ™1™
🎧INTERCEPT MALIGNANT COMMUNICATIONS🎧
🇺🇸REPORT UNPATRIOTIC ACTIVITY🇺🇸

Pretty much the same sort of logic as @Mr.Negi except I have scrapped a number of unnecessary commands, used shorter variable names and printed directly rather than putting value into a variable first.

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

Common Lisp, 84 bytes

(dotimes(i 26)(format t"~a
"(fill #1="ABCDEFGHIJKLMNOPQRSTUVWXYZ"(elt #1#i):end i)))

Try it online!

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

Charcoal, 10 bytes

F⮌αB⁻℅ι⁶⁴ι

Try it online!

Explanation:

F           For each
 ⮌α          letter in the reversed uppercase alphabet
   B         draw a box
     ⁻℅ι⁶⁴    of size the ascii code of the letter minus 64
     ι        and use the iterated char as border
\$\endgroup\$
0
\$\begingroup\$

Java 8, 93 95 85 bytes

o->{String r="";for(char i=64,j;++i<91;r+="\n")for(j=64;++j<91;)r+=i>j?i:j;return r;}

Explanation:

Try it here.

o->{                   // Method with an empty unused parameter and a String return-type
  String r="";         //  Result-String
  for(char i=64,j;     //  Index characters
      ++i<91;          //  Loop (1) from 'A' through 'Z'
      r+="\n")         //    And append a new-line after every iteration
    for(j=64;++j<91;)  //   Inner loop (2) from 'A' through 'Z'
      r+=i>j?          //    If `i` comes later in the alphabet than `j`
          i            //     Append the result-String with `i`
         :             //    Else:
          j;           //     Append the result-String with `j`
                       //   End of inner loop (2) (implicit / single-line body)
                       //  End of loop (1) (implicit / single-line body)
  return r;            //  Return result-String
}                      // End of method
\$\endgroup\$
  • \$\begingroup\$ I'm afraid your golfed code won't work. \$\endgroup\$ – Leaky Nun Aug 1 '16 at 8:01
  • \$\begingroup\$ I'm pretty sure this doesn't meet the requirement that says "If it is a function, it must be runnable by only needing to add the function call to the bottom of the program": Just adding c() to the program will not print anything. As such, your print statement should also be counted towards the total byte count. \$\endgroup\$ – MH. Aug 2 '16 at 7:04
  • 1
    \$\begingroup\$ @MH. By our defaults a function that returns the result is absolutely fine. \$\endgroup\$ – a spaghetto Aug 3 '16 at 20:07
0
\$\begingroup\$

SOGL V0.12, 18 bytes

Zl∫ZFH⌡k±JM*+Z⁄m±P

Try it Here!

SOGL doesn't have string comparison :/

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

J, 24 bytes

(,~{.#~26-#)\.65}.91{.a.

Try it online!

              65}.91{.a.   the alphabet
            \.             for each suffix starting from the longest
(      26-#)               subtract length from 26
(  {.      )               first character
(    #~    )               repeated n times
(,~        )               prepend
\$\endgroup\$
0
\$\begingroup\$

Jelly, 13 bytes

ØAxJŒgżṫJ‘$$Y

Try it online!

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

Visual Basic .NET (.NET Core), 127 bytes

Declared function that takes no input and outputs the L-phabet to the console.

Module M
Sub Main
Dim S
For I=65To 90
S=""
For J=65To 90
S+=ChrW(If(I>J,I,J))
Next
Console.WriteLine(s)
Next
End Sub
End Module

Try it online!

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

MY-BASIC, 79 bytes

Anonymous function that takes no input and outputs to the console

For I=65 To 90
For J=65 To 90
K=J
If I>K Then K=I
Print Chr(K)
Next
Print;
Next

Try it online!

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

QBasic, 69 bytes

An undeclared subroutine that takes no input and outputs to STDOUT

For I=65To 90
For J=65To 90
K=J
If I>K Then K=I
?Chr$(K);
Next
?
Next
\$\endgroup\$
0
\$\begingroup\$

Yabasic, 53 bytes

Takes no input and outputs to STDOUT

For I=65To 90
For J=65To 90?Chr$(Max(J,I));Next
?Next

Try it online!

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

Small Basic, 107 bytes

Script that takes no inpu and outputs to the TextWindow

For I=65To 90
s=""
For J=65To 90
s=s+Text.GetCharacter(Math.Max(J,I))
EndFor
TextWindow.WriteLine(s)
EndFor

Output

output

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

Gol><>, 41 28 bytes

asFaLF"Z"L-|Lm*jasL-F"Z"+||H

Try it online!

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

VBA (EXCEL) , 111 Bytes

Sub c()

For x=0 To 25
For y=0 To 25
b=y
If y<x Then b=x
a=a&Chr(65+b)
Next
a=a&vbNewLine
Next
MsgBox a
End Sub
\$\endgroup\$
0
\$\begingroup\$

JavaScript (ES6), 89 bytes

for(i=0;i++<26;){s="";for(j=27;--j;)s=String.fromCharCode(64+(j<i?i:j))+s;console.log(s)}
\$\endgroup\$
0
\$\begingroup\$

MUMPS, 63 56 bytes

f i=1:1:26 w ! f j=1:1:26 w:j>i $c(j+64) w:j<=i $c(i+64)

Tested as Intersystems Caché Objectscript

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

Japt -R, 9 bytes

;B£BhXpY

Try it

;B            :Uppercase alphabet
  ¬           :Split
   £          :Map each X at 0-based index Y
    B         :  Uppercase alphabet
     h        :  Replace as many characters as necessary at the start of that string with
      XpY     :    X repeated Y times
              :Implicit output, joined with newlines
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.