69
\$\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\$
8
  • 1
    \$\begingroup\$ Related. \$\endgroup\$
    – Leaky Nun
    Commented Jul 31, 2016 at 14:03
  • 5
    \$\begingroup\$ Can the output (as the return value from a function) be an array of lines? \$\endgroup\$
    – Doorknob
    Commented Jul 31, 2016 at 14:55
  • \$\begingroup\$ @Doorknob I would say no. \$\endgroup\$
    – Leaky Nun
    Commented Jul 31, 2016 at 14:56
  • 1
    \$\begingroup\$ I'm tried of the "here's text X. Print this" kind of challenges. \$\endgroup\$ Commented Nov 11, 2016 at 19:15
  • 1
    \$\begingroup\$ @BufferOverRead There's a good reason for the site having the kolmogorov-complexity tag. \$\endgroup\$
    – Makonede
    Commented May 25, 2021 at 23:11

130 Answers 130

1
\$\begingroup\$

Pyth, 12 bytes

VUG+*@GNN>GN

Try it online!

VUG+*@GNN>GN
VUG            For N in 26:  
   +             Join the following:
    *@GNN           The Nth element of the alphabet, repeated N times.
         >GN        The alphabet, starting from the Nth element.
\$\endgroup\$
1
\$\begingroup\$

Japt, 15 bytes

;B¬£B®<X?X:Z}÷

Test it online!

Japt -R, 12 bytes

;B¬£B®<X?X:Z

Test it online!

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

GolfScript, 57 48 27 26 bytes

91,65>^1/:&,,{)&(\:&;*&n}/

Try it online!

91,                         # Make an array from 0 to 90
   65>                      # Remove every number up to 64
      ^                     # Parse to a string
       1/:&                 # Make an array with all letters and store it in the variable &
           ,,               # Make an array from 0 to 25
             {          }/  # Execute this block for each number in the array
              )             # Increment
               &(\:&;       # Remove the first letter of & and push it
                     *      # Multiply the letter by that increased number
                      &n    # Push the letters left in & and a newline

First 7 bytes are based on this solution for another problem.

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

Pushy, 14 bytes

A65vL:^K&Mkhv"

Try it online!

A     \ Push the uppercase alphabet
65v   \ Push 65 (char 'A') to the second stack, as a counter.
L:    \ Length (26) times do:
 ^K&M \   Make every character max(char, counter)
 khv  \   Increment the counter
 "    \   Print the characters
\$\endgroup\$
1
\$\begingroup\$

Clojure, 122 bytes

(let [x(map char(range 65 91))](run! #(println(apply str %))(map #(concat(repeat %1 %2)(drop %1 %3))(range)x(repeat x))))
\$\endgroup\$
1
\$\begingroup\$

Python, 69 bytes

a="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
[print(a[n]*n+a[n:])for n in range(26)]

Try it online!

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

Excel (Office 365 Insider Preview), 47 bytes

An anonymous worksheet function that takes no input and outputs the L-phabet as a \$26\times 26\$ dynamic array to the calling cell.

This solution makes use of the =MAKEARRAY() and =LAMBDA() functions, which are currently only available via the Office Insiders program.

=MakeArray(26,26,Lambda(r,c,Char(Max(r,c)+64)))

Annotated

=MakeArray(26,26,                             ) ' Make a 26x26 array holding row & col index
                 Lambda(r,c,                 )  ' Pass the indices into a function
                                 Max(r,c)       ' Take the larger of two at each position
                            Char(        +64)   ' Add 64, and cast as char
                                                ' Output as 26x26 dynamic array
\$\endgroup\$
1
\$\begingroup\$

Python 3, 85 bytes

Based off @ugoren's Excel answer, here's my Python 3 answer that isn't special at all.

for c in range(26):
    for r in range(26):print(chr(65+max(c,r)),end='')
    print()

Explanation:

for c in range(26):     # The grid is 26x26,
    for r in range(26): # so we have to do 2 for loops
                       print(chr(65+max(c,r)),end='') # Some formula to print the letter at coordinates (c, r)
    print() # Print a newline after a row so that we can print the next row
\$\endgroup\$
0
\$\begingroup\$

C# (6.0), 173 148 Bytes

Reduced by 25 Bytes thanks to asibahi

First time code-golfing.

namespace System{class P{static void Main(){for(var i=65;i<91;++i){var a="";for(var j=65;j<91;++j)a+=(char)(Math.Max(i,j));Console.WriteLine(a);}}}}

In "readable":

namespace System
{
  class P
  {
    static void Main()
    {
      for (var i = 65; i < 91; ++i)
      {
        var a="";
        for (var j = 65; j < 91; ++j)
          a+=(char)(Math.Max(i,j));
        Console.WriteLine(a);
      }
    }
  }
}

I obviously cannot compete with other answers, but C# doesn't give much more opportunity ;-)

\$\endgroup\$
2
  • 1
    \$\begingroup\$ You're better off without both using static, and only a using System;. Also you could just place it in the global namespace. Finally .. the modifiers internal and private are redundant. \$\endgroup\$
    – asibahi
    Commented Aug 2, 2016 at 5:05
  • \$\begingroup\$ Yay I beat C#!! \$\endgroup\$
    – user54200
    Commented Aug 5, 2016 at 0:49
0
\$\begingroup\$

Pyke, 14 11 10 bytes

GFoj*Gj>ns

Try it here!

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

Scratch (scratchblocks), 323 bytes

when gf clicked
set [a v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ
set [l v] to [1
repeat (26
  set [o v] to [
  repeat (l
    set [o v] to (join (o) (letter (l) of (a
  end
  set [i v] to (l
  repeat ((26) - (l
    change [i v] by (1
    set [o v] to (join (o) (letter (i) of (a
  end
  say (o) for (1) secs
  change [l v] by (1
end

scratchblocks

Proof the scratchblocks works (assuming the add "to backpack" feature still exists!), and a project demoing it.

EDIT: At a certain width, Scratch hard-wraps speech bubbles, which I use for output. There isn't really anything I can do about that.


Scratch, 74 bytes

when gf clicked
replace item (1 v) of [l v] with ([costume name v] of [_ v

A project demoing it.

This is definitely a hack!

(It could actually be shortened a bit but then it would break if you ran the project twice. This relies on a project that is.. well, exactly as the demo project!)

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

C++, 147 bytes

._. No idea why this is too long but here u go

#include <iostream>
int i;main(){for(;i<26;i++){int j;for(j=0;j++<=i;){putchar('a'+i);}for(j=i+1;j++<26;){putchar('a'+j-1);}std::cout<<std::endl;}}
\$\endgroup\$
0
\$\begingroup\$

C, 75 bytes

Assuming ASCII (or compatible) encoding:

F(i,j){for(i=65;i<91;++i){for(j=65;j<91;++j)putchar(j<i?i:j);putchar(10);}}

Test main:

int main() { F(); }
\$\endgroup\$
0
\$\begingroup\$

C#, 139 136 134 131 bytes

void a(){for(char i='A';i<'[';i++){char j;for(j='A';j<i;j++)Console.Write(i);for(;j<'[';j++)Console.Write(j);Console.WriteLine();}}

Ungolfed:

void a()
{
    for (char i = 'A'; i < '['; i++)
    {
        char j;

        for (j = 'A'; j < i; j++)
            Console.Write(i);

        for (; j < '['; j++)
            Console.Write(j);

        Console.WriteLine();
    }
}

EDIT1: Sharing j variable by inner loops maked profit of 3 bytes.

EDIT2: Changing i <= 'Z' to i < '[' maked profit of 2 bytes.

EDIT3: Removal of j initialization in second inner loop maked profit of 3 bytes.

\$\endgroup\$
3
  • \$\begingroup\$ I think you could move the char j into the loop after it. \$\endgroup\$
    – xenia
    Commented Nov 3, 2016 at 12:14
  • \$\begingroup\$ for (char j = ...)? Moving declaration of loop control variable into inner loops makes code 3 bytes longer. \$\endgroup\$
    – paldir
    Commented Nov 3, 2016 at 12:30
  • \$\begingroup\$ Oh sorry, my mistake \$\endgroup\$
    – xenia
    Commented Nov 3, 2016 at 12:31
0
\$\begingroup\$

Commodore 128 (BASIC 7) 52 bytes

This is based on GuitarPicker's soltion above. In fact, it's a carbon copy but with line numbers, also then should be added after if conditions in Commodore BASIC.

    0 fory=65to90:forx=65to90:ifx>ythenprintchr$(x);:elseprintchr$(y);
    1 next:print:next

This might also be compatible with the Commodore Plus/4 and C16/116 (which has BASIC 3.5)

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

PHP, 120 bytes

<?$a='ABCDEFGHIJKLMNOPQRSTUVWXYZ';$b=65;$c=26;while($c>0){echo str_repeat(chr($b++),26-$c).substr($a,26-$c--).'<br>';}?>
\$\endgroup\$
3
  • \$\begingroup\$ 1) 'AB...YZ' needs no quotes (and join(range(A,Z)) is another 10 bytes shorter). 2) You can remove the <? tag if You use -r. 3) >0 is unnecessary 4) for($c=26;$c;) instead of $c=26;while($c) 5) You should loop $c from 0 to 26 and use $c / $c++ instead of 26-$c / 26-$c--. 6) Try str_pad(substr($a,...),26,chr($b++),0) instead of the str_repeat. 7) Use "\n" instead of '<br>' 8) the closing ?> tag is unnecessary \$\endgroup\$
    – Titus
    Commented Nov 11, 2016 at 12:29
  • \$\begingroup\$ 9) the curlys are unnecessary 10) You can find more gpolfing ideas at ideone.com/UUMshw to get this down to 70 bytes. Nice approach! \$\endgroup\$
    – Titus
    Commented Nov 11, 2016 at 13:01
  • \$\begingroup\$ Found another 8 bytes: for($c=A;$c!=AA;)echo"\n",str_pad(join(range($c,Z)),26,$c++,0);, and use a physical linebreak for 62 bytes. \$\endgroup\$
    – Titus
    Commented Nov 11, 2016 at 14:04
0
\$\begingroup\$

Racket 117 bytes

(let((d display)(g integer->char))(for((i 26))(for((j i))(d(g(+ i 65))))(for((k(range i 26)))(d(g(+ k 65))))(d"\n")))

Ungolfed:

(define(f)
  (let ((d display)
        (g integer->char))
    (for ((i 26))
      (for ((j i))
        (d (g (+ i 65))))
      (for ((k (range i 26)))
        (d (g (+ k 65))))
      (d"\n"))))

Testing:

(f)

Output:

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
\$\endgroup\$
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\$
1
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\$
3
  • \$\begingroup\$ I'm afraid your golfed code won't work. \$\endgroup\$
    – Leaky Nun
    Commented Aug 1, 2016 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.
    Commented Aug 2, 2016 at 7:04
  • 1
    \$\begingroup\$ @MH. By our defaults a function that returns the result is absolutely fine. \$\endgroup\$ Commented Aug 3, 2016 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\$
1
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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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