Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of printing) is allowed.

Both the lowercase and uppercase versions of the letter "A" are acceptable (that is, unicode U+0061 or unicode U+0041. Other character encodings that aren't Unicode are allowed, but either way, the resulting output of your code must be the latin letter "A", and not any lookalikes or homoglyphs)

You must not use any of the below characters in your code, regardless of the character encoding that you pick:

  • "A", whether uppercase or lowercase.

  • "U", whether lowercase or uppercase.

  • X, whether uppercase or lowercase.

  • +

  • &

  • #

  • 0

  • 1

  • 4

  • 5

  • 6

  • 7

  • 9

Cheating, loopholes, etc, are not allowed.

Since this is , the shortest solution, in bytes, that follows all the rules, is the winner.

Validity Checker

This Stack Snippet checks to make sure your code doesn't use the restricted characters. It might not work properly for some character encodings.

var t = prompt("Input your code.");

if (/[AaUuXx+&#0145679]/.test(t)) {
  alert("Contains a disallowed character!");
} else {
  alert("No disallowed characters");

This Stack Snippet that makes sure you don't have a disallowed character is also available on JSFiddle.


var QUESTION_ID=90349,OVERRIDE_USER=58717;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}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>

  • 6
    \$\begingroup\$ @ColdGolf You seem to be saying "yes" to functions, but functions don't display, they usually return. \$\endgroup\$ – xnor Aug 19 '16 at 23:06
  • 1
    \$\begingroup\$ Is ending up with a variable that contains just a also good enough ? \$\endgroup\$ – Ton Hospel Aug 19 '16 at 23:17
  • 1
    \$\begingroup\$ That's not what I meant. The supposed code doing a variable assignment would not contain any of the forbidden characters. I'm just trying to understand what is covered by "display by means other than printing". If "return from a function" is OK, what about "assign to a variable" ? \$\endgroup\$ – Ton Hospel Aug 20 '16 at 0:05
  • 1
    \$\begingroup\$ Why those particular characters? \$\endgroup\$ – immibis Aug 22 '16 at 1:32
  • 7
    \$\begingroup\$ @immibis A for obvious reasons. U for Unicode escape strings (\u0041 is A), X for hex escape strings (\x41), + for Unicode ordinals (U+0041), & for HTML entities, # for I actually don't know, 65 is the decimal ordinal of A, 41 is the hex ordinal of A, 97 is the decimal ordinal of a, and 0 for a few of the previous reasons. \$\endgroup\$ – Mego Aug 22 '16 at 6:26

158 Answers 158


Pluso, 1 byte


Pluso Esolangs Page.

Pluso contains a single accumulator, that starts with the value 1. It uses two commands, p which increments the accumulator (mod 27), and o which prints the current value as an uppercase ASCII character, A-Z or space (where 1-26 represents A-Z respectively, and 0 represents space).

As the accumulator starts at 1, the command o with no prior p will output A.

  • 13
    \$\begingroup\$ Welcome to PPCG! I would recommend putting the explanation in your answer, in case the link dies for whatever reason. \$\endgroup\$ – TheBikingViking Aug 22 '16 at 7:48
  • \$\begingroup\$ Explanation added. Waiting for moderator approval. \$\endgroup\$ – KPM Aug 23 '16 at 20:22
  • 2
    \$\begingroup\$ Thanks for the recommendation (and the welcome), I have updated my answer to include a brief explanation. \$\endgroup\$ – cdw Aug 24 '16 at 3:02
  • \$\begingroup\$ I just upvoted to put you at 666 rep. Sorry about that. \$\endgroup\$ – Aidan F. Pierce Aug 25 '17 at 1:05
  • 3
    \$\begingroup\$ Doesn't this fail the "is an esolang" test because it can't do primality checking? \$\endgroup\$ – Magic Octopus Urn Oct 12 '17 at 18:52

Python 2, 14 bytes


The expression 3<3 gives the Boolean False, and the backticks give its string representation 'False'. From here, it remains to extract the letter a. Python is 0-indexed, so the a is at index 1, which is a banned character. It can be expressed as 3-2, but there's a shorter way. Python allows indexing from the back, with index -1 for the last entry, -2 for the one before it, and so on. We want index -4, but 4 is also a banned number. But, we can express it as ~3 using the bit-complement ~, which gives -n-1 for ~n.

  • 6
    \$\begingroup\$ That's a really cool solution. Also, couldn't you do [2] instead of [~3]? \$\endgroup\$ – DJMcMayhem Aug 19 '16 at 22:11
  • 5
    \$\begingroup\$ @DJMcMayhem It's 0-indexed unfortunately, it would need [1]. \$\endgroup\$ – xnor Aug 19 '16 at 22:12
  • 4
    \$\begingroup\$ ... why are 1 and 4 'banned' numbers?? \$\endgroup\$ – Chris Cirefice Aug 23 '16 at 21:22
  • 4
    \$\begingroup\$ The challenge's rules say so. \$\endgroup\$ – xnor Aug 23 '16 at 23:46
  • 18
    \$\begingroup\$ I'm now even considering using "~0" being read as "zero indexed first element from the back". I wonder why we would use "-1" notation in Python.... \$\endgroup\$ – PascalVKooten Aug 24 '16 at 8:36

Pyth, 2 bytes


Test it in the Pyth Compiler.

How it works

 G  Yield the lowercase alphabet.
h   Extract the first character.

PHP, 9 6 bytes


For 9 bytes: Inspired by @Ton Hospel's answer. Plus, it has the added benefit of looking a bit like a Kaomoji. :-)

The 6 bytes improved version:


wherein ¾ has the hex code of 0xBE (it is important to save the file in Latin-1 encoding, not UTF-8!).

  • \$\begingroup\$ An alternative version is f^E^b. \$\endgroup\$ – Ismael Miguel Aug 20 '16 at 0:53
  • \$\begingroup\$ Yes, the 9-byte solutions are abundant. I started with y^'8' and x^'9', unfortunately numbers have to be cast to string or it will XOR the resulting type will be an integer. \$\endgroup\$ – YetiCGN Aug 20 '16 at 7:39
  • 23
    \$\begingroup\$ +1 for the face ^_^ \$\endgroup\$ – Cyoce Aug 21 '16 at 6:46
  • \$\begingroup\$ The 6 Byte version doesn't print A. It prints =A. \$\endgroup\$ – UTF-8 Aug 21 '16 at 9:56
  • 1
    \$\begingroup\$ I know the answer to this riddle now: In UTF-8 the "fraction three quarters" codepoint is encoded as two bytes: 0xC2 0xBE, 0xBE being the same as in ISO-8859-1. I noticed that when I saved this to a file on my linux box, which I access via SSH with UTF-8, of course, that the file is 7 bytes. So, save the script with Latin-1 encoding and it will be 6 bytes and not output the = character. \$\endgroup\$ – YetiCGN Aug 22 '16 at 18:38

05AB1E, 3 2 bytes



T   # push 10
 h  # convert to hex

Try it online

Saved 1 byte thanks to Adnan

  • 5
    \$\begingroup\$ Th for two bytes :) \$\endgroup\$ – Adnan Aug 19 '16 at 22:15
  • 1
    \$\begingroup\$ @Adnan Oh of course. Hex :) \$\endgroup\$ – Emigna Aug 19 '16 at 22:29

brainfuck, 16 bytes


This is based on Esolang's brainfuck algorithm for 159.

Try it online!

  • 3
    \$\begingroup\$ This.... this is wizardry. \$\endgroup\$ – Conor O'Brien Aug 19 '16 at 22:38
  • 3
    \$\begingroup\$ This solution uses the cell at index -1, which isn't supported across all brainfuck interpreters and would result in a crash. You can run it here to see fatiherikli.github.io/brainfuck-visualizer/… \$\endgroup\$ – Cody Aug 19 '16 at 22:55
  • 37
    \$\begingroup\$ @Cody On PPCG, languages are defined by their implementation. As long as there is one interpreter that behaves as desired, it is a valid solution. \$\endgroup\$ – Dennis Aug 19 '16 at 22:59
  • 3
    \$\begingroup\$ How hard was it for you to avoid the forbidden characters? \$\endgroup\$ – Hagen von Eitzen Aug 23 '16 at 20:15
  • 1
    \$\begingroup\$ @HagenvonEitzen I had to dig a bit to find an algorithm that could avoid +. (the shortest way to print A would be >+[+[<]>>+<+]>.), but thanks to list of constants on Esolang, not too hard. \$\endgroup\$ – Dennis Aug 23 '16 at 20:25

JavaScript (ES6), 17 16 14 bytes

Saved two bytes thanks to Neil!

_=>` ${-_}`[2]

Returns the second character of NaN, which is a.

This is the shortest I could come up with for A, 43 42 bytes:


Who says being an obfuscator doesn't help with code golf? Not I!


The first one, in depth.

_=>` ${-_}`[2]

-_ is NaN, because _ is undefined. To get this as a string, one would need one of the following:


The last is too long, and the first uses +. So we use the second one. Now, the a is at index 1. This isn't any good, because 1 is forbidden. However, being a template string, we can put a space in there to make it at index 2, thus leaving us with ` ${-_}`.

The second one, in depth.


This one was a doozy.

_=>`                                `[-~8]

This is the 9th character of the inside template string, -~8 being equal to 9. In this case, this template string is just for stringification. This is the inside equation being stringified, in between ${...}:


Let's expand this a bit:

(new Array())[`constr${`${!_}`[2]}ctor`]

This gets the property `constr${${!""}[2]}ctor` from an empty array. This property is, of course, a template string, but it has some text around it. It's roughly equivalent to:

"constr" + `${!_}`[2] + "ctor"

The inside is in turn equivalent to:


!_ is true (because _ is undefined, and !undefined === true), and stringified is "true". We get the second character of it, u; we have to get it this way to avoid explicitly putting u in our code.

So, this inside bit is equivalent to:

"constr" + "u" + "ctor" === "constructor"

So we are getting the constructor of the Array, the Array function. I couldn't put this down explicitly because it contains the forbidden A. Now, stringifying the Array function yields "function Array() { [native code] }".

Back to the original code:


This is equivalent to, as we've seen:


Equivalent to:


Finally equivalent to:

  • 1
    \$\begingroup\$ @ColdGolf It's alright. \$\endgroup\$ – Conor O'Brien Aug 19 '16 at 23:07
  • 2
    \$\begingroup\$ Would it be against the principles of an obfuscator to add an explanation...? I'm curious about how this works. \$\endgroup\$ – trichoplax Aug 20 '16 at 17:47
  • 2
    \$\begingroup\$ @trichoplax I suppose it wouldn't hurt to reveal my methods here ;) I added an explanation for both. \$\endgroup\$ – Conor O'Brien Aug 20 '16 at 19:48
  • 1
    \$\begingroup\$ @OldBunny2800 No. a is a forbidden character, and is in toUpperCase. \$\endgroup\$ – Conor O'Brien Aug 21 '16 at 18:26
  • 3
    \$\begingroup\$ I thought this was Perl at first. \$\endgroup\$ – Οurous Aug 22 '16 at 22:51

Hexagony, 4 bytes

Ayyy lmao? Quite golfy for a non-golfing language haha. Code:


Try it online!

A more readable form:

 B (
; @ .
 . .

This puts the ASCII value of the letter B, which is 66, on the current memory edge. It substracts it by one using ( and prints it with ;. After that, the program is terminated using @.

Obligatory path image:

enter image description here

  • 8
    \$\begingroup\$ "more readable" + hexagony = ??? \$\endgroup\$ – Not that Charles Sep 14 '16 at 18:54

Actually, 2 bytes


Try it online!


ú   lowercase English alphabet
 F  first element
  • \$\begingroup\$ are you the author? I haven't seen this language before. \$\endgroup\$ – loa_in_ Aug 23 '16 at 12:52
  • \$\begingroup\$ I've seen it pop up a couple times in challenges now. I think it has the most clever name of any of the golfing languages on the site :-) I've been watching Suits lately and I find it to be very Harvey. \$\endgroup\$ – corsiKa Aug 24 '16 at 14:52

Jelly, 3 bytes


Try it online!

How it works

ØWḢ  Main link. No arguments.

ØW   Yield "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_".
  Ḣ  Head; extract the first character.

Jelly, 4 bytes


Try it online!

How it works

l-ṾṂ  Main link. No arguments.

l-    Take the logarithm of 0 with base -1. Yields (nan+infj).
  Ṿ   Uneval; yield the string representation, i.e., "nanıinf".
   Ṃ  Take the minimum, returning 'a'.
  • 1
    \$\begingroup\$ Too bad the second approach is longer. ._. \$\endgroup\$ – Dennis Aug 19 '16 at 22:26
  • 6
    \$\begingroup\$ Thanks for including the second approach. It's beautiful \$\endgroup\$ – trichoplax Aug 20 '16 at 17:53

CJam, 3 bytes


Try it online!

How it works

'@   Push the character '@' on the stack.
  )  Increment its code point, yielding 'A'.

Bubblegum, 1 byte




Everyone seemed to forget it existed...

  • \$\begingroup\$ Never used Bubblegum before, so perhaps excuse my ignorance, but where can I find the docs for Bubblegum? Also, I tried bubblegum.tryitonline.net with both your answers, but it doesn't seem to output anything. \$\endgroup\$ – Kevin Cruijssen Aug 22 '16 at 12:38
  • 1
    \$\begingroup\$ @KevinCruijssen Doc: esolangs.org/wiki/Bubblegum TIO seemed to accept only the hexdump of the source code, so try it like this: bubblegum.tryitonline.net/… \$\endgroup\$ – jimmy23013 Aug 22 '16 at 12:44
  • \$\begingroup\$ Ah, that's my problem; not using the hexdump. Thanks and +1 for being the shortest with a single-byte answer (tied with Pluso). \$\endgroup\$ – Kevin Cruijssen Aug 22 '16 at 12:56
  • \$\begingroup\$ @KevinCruijssen There is a 1 byte Pluso answer. It has some problems with a strange site rule, though. \$\endgroup\$ – jimmy23013 Aug 22 '16 at 12:59

Perl, 9 8 bytes

xor is still allowed, but say isn't. So for 9 bytes:


However using output to STDERR gives 8 bytes:


Replace \x9e and \xf5 by their literal versions. Or generate the executable file using:

perl -e 'printf q(die~"%s"),~"a\n"' > a.pl
  • \$\begingroup\$ @ColdGolf: That's not clear to me. Do you mean I can use say (contains a) for printing as long as the construction of the argument doesn't use the forbidden characters ? \$\endgroup\$ – Ton Hospel Aug 19 '16 at 23:13
  • \$\begingroup\$ "However, you must not use any of the below characters in your code: * A, whether uppercase or lowercase." From that, I'd print "No using the letter with code point 65";. \$\endgroup\$ – haykam Aug 19 '16 at 23:22
  • \$\begingroup\$ @ColdGolf is that meant to answer the question in any way? \$\endgroup\$ – hobbs Aug 20 '16 at 22:55

><>, 6 bytes


this creates a string of characters, bounces and creates it again in reverse, flips the top 2 stack items and subtracts: '|' (124) minus ';' (59) is 'A' (65)

Try it online

  • 2
    \$\begingroup\$ Nice! I got '$-o;| which is almost the same but without the bouncing. (|;o-$' also works.) \$\endgroup\$ – randomra Aug 20 '16 at 20:32
  • 1
    \$\begingroup\$ @randomra oh true! that would definitely run faster, so nice job \$\endgroup\$ – torcado Aug 21 '16 at 5:24

Ruby, 15 12 bytes

  • 1
    \$\begingroup\$ You can save 2 bytes changing $><< to p , makes p to_s[-3] \$\endgroup\$ – Ephi Aug 22 '16 at 8:56
  • \$\begingroup\$ @Ephi p calls inspect on its arguments, so the output will be quoted, which would disqualify it. \$\endgroup\$ – Jordan Aug 22 '16 at 12:56
  • \$\begingroup\$ I missed that part of the challenge, I'll let those comments as I think it's an interesting information :) \$\endgroup\$ – Ephi Aug 22 '16 at 13:06

MATL, 5 bytes


Try it Online


YN      % Creates a NaN value (not a number)
V       % Convert it to a string
H)      % Grab the second letter ('a')
        % Implicitly display the result

My original answer was the straight forward approach using the pre-defined literal lY2 which yields 'A'...'Z' and then selecting the first element, 'A'.


Javascript, 18 bytes 16 bytes 12 bytes 11 bytes

` ${!2}`[2]

Based on modified jsfuck basics (had to figure out how to replace + with -).


Well, at least a version with comments (note that this version will probably not run):

` ${      // whitespace to make "a" the third letter
  !2      // returns false
}`        // convert to string "false"
[2]       // index the third letter in " false" (note the whitespace)

Old solution:

  • \$\begingroup\$ You can replace the parenthesis with a space between the minus signs. \$\endgroup\$ – Pietu1998 Aug 20 '16 at 13:44
  • \$\begingroup\$ @Pietu1998: I noticed that 3 is allowed so replaced the whole thing with boring old 3-2 to get 1 \$\endgroup\$ – slebetman Aug 20 '16 at 14:53
  • \$\begingroup\$ Saved one byte thanks to Conor O'Brien's answer \$\endgroup\$ – slebetman Aug 20 '16 at 15:03
  • 1
    \$\begingroup\$ Uh, no offense, but this pretty much is my answer. Except you use false instead of NaN and don't use a function. \$\endgroup\$ – Conor O'Brien Aug 21 '16 at 6:28

Java, 55 bytes

void f(){System.err.write('c'-2);System.err.println();}

Since the code has to print it, one of the two built-in writers are required. System.out is, well, out, because it contains u. System.err works, however.

The next hurdle is Java's handling of char and int. Since it is not allowed to cast to char because it contains a, and because 'c' - 2 gets promoted to int, another mechanism is required. System.err is a PrintWriter, which has a write(char) method but not write(int). Putting 'c' - 2 in there forces it to char without a cast.

Finally, every time I ran the program the buffer for System.err would not flush like it is supposed to, and the program printed nothing. So I had to flush it manually. However, System.err.flush() is not allowed, so I called println() which implicitly flushes the underlying stream.


Vim, 16 13 11 10 keystrokes

Thanks to H Walters for saving two keys

Thanks to DJMcMayhem for saving another!

:h%<cr> #open help for percent
jvy     #move down one char (to the letter "a"), visual mode the character, yank
ZZ      #exit help for percent
p       #put yanked character
  • \$\begingroup\$ Very nice approach! \$\endgroup\$ – YetiCGN Aug 20 '16 at 12:19
  • 2
    \$\begingroup\$ Save 3 bytes; instead of :h<cr>, try :h%<cr>. That's one extra character, but you wind up on the help for %, with your cursor right over an a. So from here you can replace 33ll with j. \$\endgroup\$ – H Walters Aug 21 '16 at 2:30
  • \$\begingroup\$ Apologies for obvious typo (save 2 bytes) \$\endgroup\$ – H Walters Aug 21 '16 at 3:06
  • \$\begingroup\$ You can use ZZ instead of :q<cr> to save another one. \$\endgroup\$ – DJMcMayhem Aug 25 '16 at 21:12

><>, 7 4 bytes

Saved 3 bytes thanks to Teal pelican


Try it online!


"-o."   # pushes the string "-o."
-       # subtracts the charcode of o from the charcode of . (dot), 111-46=65
o       # prints as character
.       # tries to pop 2 coordinates to jump to, but as nothing is left on the stack
        # the program ends in an error
  • \$\begingroup\$ I would have done "B"1-o; \$\endgroup\$ – DanTheMan Aug 22 '16 at 18:36
  • \$\begingroup\$ @DanTheMan That should have been the more obvious solution. I wonder why I didn't think of that :P \$\endgroup\$ – Emigna Aug 22 '16 at 18:46
  • \$\begingroup\$ @DanTheMan :- Going off what Dan posted you can reduce this down further to; "1-o;B or even better "+o;& as either case is allowed making this 5 bytes :) - you can even make it 4 bytes with an error; "-o. \$\endgroup\$ – Teal pelican Jul 18 '17 at 15:06
  • \$\begingroup\$ @Tealpelican: That's brilliant! Using strings are often shortest in challenges like these, but I didn't even consider that :) \$\endgroup\$ – Emigna Jul 18 '17 at 15:29
  • \$\begingroup\$ Once I saw Dan's comment it reminded me of an older challenge quite like this so just used the same concept :) \$\endgroup\$ – Teal pelican Jul 18 '17 at 15:46

R, 27 12 bytes

EDIT : New version, from an excellent idea from @Jarko Dubbeldam


Quite a funny challenge !

Basically, this takes the 26th element of the reversed vector containing the uppercase letters (LETTERS, which is a R's built-in vector)

Previous versions (same number of bytes) :

  • 1
    \$\begingroup\$ A bit late, but you can save quite a bit with LETTERS[T*T]. T evaluates to 1 when doing numerical operations. \$\endgroup\$ – JAD Jan 1 '17 at 17:30
  • \$\begingroup\$ I found a shorter solution! \$\endgroup\$ – Giuseppe Jul 18 '17 at 15:52
  • \$\begingroup\$ This isn't technically a solution --- it prints '[1] "a"' , rather than just 'a' \$\endgroup\$ – JDL Aug 28 '17 at 22:07

Brainfuck, 192 19 bytes


Thanks to @NinjaBearMonkey for helping me save hella bytes


I'm not good at Brainfuck so I'm sure theres a shorter solution, but it works by decrementing below 0, rolling the byte over, and keep going until it gets down to 'A', then it prints.

  • 1
    \$\begingroup\$ not a serious competitor. If you actually golf it down, the downvoter might invert their vote \$\endgroup\$ – Destructible Lemon Aug 19 '16 at 22:30
  • \$\begingroup\$ Wouldn't it be much shorter to just count up to 65, even with 65 plusses? \$\endgroup\$ – NinjaBearMonkey Aug 19 '16 at 22:33
  • 2
    \$\begingroup\$ '+' isn't allowed, so I had to go backwards \$\endgroup\$ – Cody Aug 19 '16 at 22:34
  • \$\begingroup\$ Sorry, I didn't see that. There's still far shorter ways to make 191, though. \$\endgroup\$ – NinjaBearMonkey Aug 19 '16 at 22:36
  • 2
    \$\begingroup\$ That was the 192 byte solution, I just left it up and did the strikethrough instead of deleting it because I thought it was funny going from 192 to 19 \$\endgroup\$ – Cody Aug 19 '16 at 23:30

JavaScript (ES6), 21 bytes


I originally tried converting false to string to do this, but it took me 23 bytes at the time. I've since come up with a shorter way, which is this for 14 bytes:


I don't think you can get an uppercase A under the rules, since you need one of String.fromCharCode or .toUpperCase(), both of which contain a.

  • \$\begingroup\$ You can get uppercase a using JSF or a derivative using computed properties \$\endgroup\$ – Downgoat Aug 20 '16 at 2:41
  • 1
    \$\begingroup\$ @Downgoat Conor O'Brien already showed how. \$\endgroup\$ – Neil Aug 20 '16 at 9:31

C, (19?) 24 bytes

Thanks to Dennis:


same length:


which enables also lowercase:


There is a 19 bytes solution as a function modifying its parameter, which has a flaw:



  int c; //cannot be char

If c was declared char, g modifies the whole int so it smashes the stack which causes other values to be modified or the programm to abort with an error message. The only way to circumvent is to declare int c; in main and print with "%c", but that feels like a loophole.

older solutions

f(){printf("%c",'B'-2/2);} //26 bytes
f(i){i='B';printf("%c",--i);} //29 bytes
f(){int*i="B";int j[]={*i-(2/2),2-2};printf("%s",j);} //53 bytes

Just a function, since main is forbidden.

  • 3
    \$\begingroup\$ 88-23 should save a few bytes. \$\endgroup\$ – Dennis Aug 19 '16 at 22:43
  • \$\begingroup\$ For lower case a, you can use (333-33)/3-3. It's not as short as 'c'-2, but it's 3er. 33*3-2 is also possible. \$\endgroup\$ – rici Aug 20 '16 at 19:42
  • \$\begingroup\$ If you use write() instead of printf you can make it a program; specify the build steps to ensure you don't link against any libc at all; if there is no _start the first symbol is jumped to and _exit is allowed so it's safe. At least one version of gcc will optimize write() into the direct syscall with no function call at all. \$\endgroup\$ – Joshua Aug 24 '16 at 22:58
  • \$\begingroup\$ Depending on your IDE you can do something like this: printf("%c",~'ɦ');, though the "A" will have an accent mark added heh \$\endgroup\$ – Albert Renshaw Jan 24 '17 at 9:48
  • \$\begingroup\$ @AlbertRenshaw ɦ is a 2-byte-character \$\endgroup\$ – Karl Napf Jan 25 '17 at 19:49

dc, 4 bytes


UCHAR_MAX overflow rolls through the table six three times before landing at 65.


Lua, 36 bytes

This one took me a while since MANY of the standard Lua functions are taken away from the rules (all of math, string.char, string.match, pairs, even next)

This takes advantage of the fact that Lua has a global _VERSION that usually starts with "Lua" (e.g., Lua 5.1, or similar for other versions), so unless this is run on a non-mainstream interpreter, the third character will be an 'a'


The {...}[3] is to group the results of find which also includes the indices where it matched, and then return the third item which is the matched character (the a)

  • 1
    \$\begingroup\$ print(({type{}:find".(.)"})[3]) 31 bytes \$\endgroup\$ – Egor Skriptunoff Aug 27 '16 at 13:14

Vim, 2 Keystrokes

vim -u NONE then run the following (-u NONE turns off customization)


When vim is run in compatible mode the arrow keys are don't get interpreted properly. <up> gets interpreted <esc>OA which leave the following in insert mode. Which would leave (with a couple of trailing newlines)


i starts insert mode.
<up> exits insert mode, opens a line above and enters A into the buffer

Example of people encountering this in the wild. https://stackoverflow.com/questions/6987317/while-moving-the-cursor-across-a-vim-process-open-in-a-tmux-session-every-now-a/6988748#6988748

  • \$\begingroup\$ I laughed as I read it. This is good work. Great weaponization of something I know, but wouldn't have thought of. \$\endgroup\$ – udioica Oct 13 '16 at 15:50

Haskell, 10 bytes

As a function (or rather a statement as no input is required)

f=pred 'B'

does the trick. Try it on Ideone. A full program is impossible as this would need to contain a main.

  • \$\begingroup\$ I don't think this is valid. The task requires to "print" or "display" A. Your functions just returns it and the linked program displays it via putChar which uses u. \$\endgroup\$ – nimi Aug 19 '16 at 22:43
  • \$\begingroup\$ You're right, however the rules have been updated and now returning from a function seems to be ok. \$\endgroup\$ – Laikoni Aug 19 '16 at 23:02
  • \$\begingroup\$ No, the rules still say print and/or display. \$\endgroup\$ – nimi Aug 19 '16 at 23:05
  • 2
    \$\begingroup\$ Dennis asked explicitly whether returning from a function instead of printing is ok and OP replied with yes, but the afterwards updated wording of the question still doesn't reflect this. I guess we still have to wait for further clarification. \$\endgroup\$ – Laikoni Aug 19 '16 at 23:33
  • 1
    \$\begingroup\$ The OP confirmed that A should be printed/displayed and not returned. \$\endgroup\$ – nimi Aug 20 '16 at 18:49

Brachylog, 4 bytes


Try it online!


@Z      The string "zyxwvutsrqponmlkjihgfedcba"
  tw    Write the last element to STDOUT

dc, 8 7 bytes

-1B thanks to Dennis

88 23-P

Pushes 88, pushes 23, subtracts, leaving 65. Print top of stack (65) as an ASCII string, sans trailing newline.


These are a few of the other ways I came up with. It basically became a game of "generate the numbers 65 and 97 using only [238B-F] and without addition". Ironically, I find the longest ones most interesting.

_Fdd/r-oC 2-n  # involves changing the base
Idd2/2/-2*on   # also changes base
B 3d**2-P
33 3*2-P

protected by Community Nov 11 '16 at 15:10

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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