# The Letter A without A

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 {
}

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

• @ColdGolf You seem to be saying "yes" to functions, but functions don't display, they usually return.
– xnor
Aug 19, 2016 at 23:06
• Is ending up with a variable that contains just a also good enough ? Aug 19, 2016 at 23:17
• 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" ? Aug 20, 2016 at 0:05
• Why those particular characters? Aug 22, 2016 at 1:32
• @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.
– user45941
Aug 22, 2016 at 6:26

# Whitespace, 15 bytes

It's easy to avoid characters with a language that doesn't use any of them!

Try it online!

.
.
.

The .'s are unneccessary, and are just to make the codeblock work.

For a more readable format: s = space, t = tab, newline placement matters

ssstssssst
t
ss

First line pushes (ss) positive (s) 65 (tssssst, binary 1000001) onto the stack)

Second and third lines print top of stack as char.

# Mathematica, 27 25 bytes

Writes 10 in base 24. Half the length is one function name :(

IntegerString[2(8-3),3*8]

Thanks to Xavier for pointing out that the base doesn't have to be 16 (as in my original hexadecimal solution)!

• What about First@WordList[]?
– user48818
Aug 22, 2016 at 16:21
• @Xavier: Make that an answer and I'll upvote it! Aug 22, 2016 at 17:52
• Done! A small gain for your approach: IntegerString[8 + 2, 3*3 + 2] :-)
– user48818
Aug 22, 2016 at 20:09
• Unfortunately the mean OP doesn't let us use + in this challenge :) I upvoted your answer though! Aug 23, 2016 at 4:44
• Ah yes, I have missed the + in the constraints. +1 as well!
– user48818
Aug 23, 2016 at 12:47

# Python 3, 18 17 bytes

print(chr(88-23))

Prints the Unicode value 0x41 = 65 - credit SnoringFrog

print(str(int)[3])

Prints index 3 (the fourth character) of the string "<class 'int'>":

print(chr(33*3-2))

Prints the Unicode value 0x61 = 97

• 88-23 saves one byte over 33*3-2 in the second example Aug 23, 2016 at 14:29
• @SnoringFrog - how did I miss it?! Thanks! Aug 24, 2016 at 8:52

# DC, 6 bytes

3BFFvP

...spits out an A and nothing else.

# JavaScript ES6 ES5, 2317 12

12 bytes

${!3}[3-2] 17 bytes: (typeof!3)[2- -3] 23 bytes: _=()=>(typeof!3)[2- -3] Edit 05/10/2016: Took advantage of templating strings, as well as boolean coercion and string/array indexing... Also realized my previous code used +, I could always salvage 2+3 as 2- -3 at a cost of 2 bytes for each previous example... (Updated code and scores for previous submissions) Edit 30/08/2016: I took a different approach, exploiting the fat arrow functions as well as the typeof return type, which is a string. So converting a number to a boolean was easier then, had to encase it in parentheses before pulling the 5th element of the resulting string... Seems that there was no mention of my answer requiring to be in the form of a function, so I've just stripped the fat arrow function declaration. # Piet, 30 codels I'm sure that this can be improved, but I'm a bit of a Piet newbie. Side note: I have titled it Icy Toll Gate to a Nether Portal. It's artistic, but not abstract, so it kind of follows the main design principle! • Following community consensus on the meta, piet is now scored by the byte count of the image. You can try to compress it as much as possible provided there is a piet interpreter which accepts it. Jan 1, 2017 at 22:39 # C++14, 30 bytes As unnamed lambda (allowed in Python): [](decltype('B')*c){*c='C'-2;} //'c'-2 for lowercase //Usage: #include <iostream> main(){ char c; [](decltype('B')*c){*c='C'-2;}(&c); std::cout << c << std::endl; } ### 33 bytes Function that assigns to its parameter: int f(decltype('B')*c){*c='C'-2;} //Usage: #include <iostream> main(){ char c; f(&c); std::cout << c << std::endl; } Pretty hard to do it otherwise since no #include, return or auto because of U. Modifying parameters for return values seems ok Meta • You could just use the same printf code as in your C solution inside the lambda and get rid of the argument to make it shorter. Aug 20, 2016 at 21:20 # SMBF, 4 bytes <-.B Try it Online! Explanation: <- Wrap pointer around to the "B" and decrement it, giving "A" . Print B Data storage # JavaScript, 21 Capital A because there seems to be no other solution to find a capital A _=>${[].keys()}[8]

${[].keys} => "[object Array Iterator]" 8th index is A _=>${keys}[38]

Also works in browser for similar reasons.

Edited to add function

# Powershell, 11 bytes

" $(!2)"[2] Every non-0 integer evaluates to True when casted to [bool]. !2 implicitly converts 2 to [bool] and negates it, so it becomes False.$() blocks inside a string allow expressions to be evaluated before being converted to string.
When accessing a string with an index the string is treated as a char-array.
Since we're not allowed to use 1 i had to use a space to shift the a in False one to the right. Another option would be a negative index: "$(!2)"[-4]. # !@#$%^&*()_+, 3 bytes

^@

Try it online! Outputs lowercase.

Shortest for A seems to be 5 bytes: >^^^@ or B_^_@.

## Explanation

^@
     push the character ""
^    increment (to a)
@   output as character

## Keg, 3 2 bytes

B;

This pushes the ASCII character B onto the stack, and then decrements the value by 1. The value will automatically be printed.

# Unary, 134,032,404,790,876 bytes

I couldn't resist ;)

Programs consists of 62544587333324 and 134032404790876 times the character B (or any allowed character you choose to). (Actually pretty short for Lenguage/Unary..)

Byte-counts generated by this program I wrote in 05AB1E.

• Do your brainfuck include +?
– l4m2
Mar 19, 2021 at 11:57
• @l4m2 What do you mean? Mar 19, 2021 at 13:03

# International Phonetic Esoteric Language, 8 bytes

My original answer used the old instruction set and interpreter, which have since been completely rewritten. Still abusing Unicode, and somehow the same length heh.

"C"ʁ2zχo

Explanation:

"C"ʁ     (push "C", convert str to num 67) ( -- 67)
2    (push 2) ( -- 67 2)
z   (subtract) ( -- 65)
χ  (convert num to str) ( -- "A")
o (print) ( -- )

# International Phonetic Esoteric Language, 8 bytes (WIP language) (OLD)

2<C>ʀdχo

The wonders of abusing Unicode as your instruction set.

No TIO interpreter yet, but is runnable by cloning the repository above, and calling python main.py "code here".

2<C>ʀdχo
2        ; push 2
<C>     ; push "C"
ʀ    ; pop, push ord("C")
d   ; pop, push 67 - 2
χ  ; pop, push chr(65)
o ; pop, print string

# Brainetry, 141 bytes

a b
a b c d
a b c d e f g h
a b c d
a b c d e f g h
a b c
a b c d e f g h i
a b
a b
a b c d
a b c
a b c d
a b c d e f g h i
a b
a b c d e f g

The code above is the golfed version of this program:

Hey, look,
I'm not even going
to try, ok? I will jvst write regvl@rly
@nd then svbstitvte the
letters yov do not w@nt me to vse.
Is this ok@y?
I re@lly hope yov do not mind. Other th@n
th@t, this
is @
f@irly st@nd@rd ch@llenge, I
jvst went online
@nd googled short w@ys
of gener@ting the const@nt 65 in br@infvck. Of covrse
I w@s
sent str@ight to the Esol@ngs web p@ge.
• In the first section, you have a's. In the second section you have 5 and 6. Nov 7, 2020 at 22:20

# x86-16 machine code, IBM PC DOS, 6 bytes

Binary (CP437):

░@@═)├

Unassembled listing:

B0 40       MOV  AL, '@'    ; One below ASCII 'A'
40          INC  AX         ; increment char
CD 29       INT  29H        ; write AL to console

# Whispers v2, 190* 108 bytes

> e
> 8
>> 2²
> e
> e
> e
> e
>> ≻3
> e
> e
> e
> e
> e
> e
> e
> e
> e
> e
> e
> e
> e
>> '8
>> Error 22

Try it online!

Outputs A to STDERR, which is an accepted method of output

*82 bytes saved by golfing formula from $$\65 = (3 - (-2)) - (-2 \times 3) \times (8 - (-2))\$$ to $$\65 = 8^2+1\$$

## How it works

Whispers is different to most languages, in that numbers (0123456789) don't always represent their numerical values. A Whispers program is a series of lines, each of which matches (at least) one of a series of regexes. All the regexes require a line to begin with either > or >> (note the space).

Lines that begin with > are nilad lines, and return a constant value each time. on these lines, digits do represent their respective numerical values. For example, line 2 (> 8) returns the integer $$\8\$$.

However, lines beginning with >> treat numbers as line references, rather than numerical values. This means that >> 2² doesn't actually return $$\2^2 = 4\$$. Rather, it retrieves the value on line 2 and returns its square. Execution works by starting on the last line, and getting values passed along through other lines, similar to a game of Chinese Whispers (hence the name).

Now, as we can't use any of 0145679, we have to construct either $$\65\$$ or $$\97\$$ using only $$\2\$$, $$\3\$$ and $$\8\$$. Furthermore, we can't refer to any lines aside from 2, 3, 8, 22, 23, etc. which is why we have so many lines that are just > e. These are all unexecuted, and just serve to pad the important lines to line numbers that we can use.

We use the formula $$\65 = 8^2 + 1\$$ in order to build $$\65\$$ (the char code of A). Luckily, Whispers has an increment command (), so we don't have to deal with addition or calculating the number $$\1\$$. So, we start execution on the last line:

>> Error 22

This calls line 22, outputs its value to STDERR, then exits. Line 22, directly above, is

>> '8

' is the to character command, equivalent to Python's chr builtin, so here, we take the value on line 8 and convert it to a Unicode character. Now, we can see lines 2, 3 and 8, in order:

> 8
>> 2²
>> ≻3

Kind of counter intuitively, these lines are executed in reverse order: first line 8 increments the value on line 3, then line 3 squares the value on line 2 i.e. $$\8\$$. Ultimately, line 8 returns $$\8^2 + 1 = 65\$$ which is then cast to character and outputted to STDERR.

# Python 3, 24 bytes

print(chr(88-23),end='')

Prints an uppercase A without a newline.

print chr(88-23)

# Excel, 15 bytes

=MID(2=3,2,3-2)

Show the second character in FALSE

# VBA (immediate window), 14 12 bytes

Lower case (12): ?chr(33*3-2)
Upper case (14): ?chr(8*8--3-2) or ?chr(23*3-2-2)

# Piet + ascii-piet, 14 bytes (10×2=20 codels)

sSsSKNMTFVrFff

Try Piet online!

(Previous record: 30 codels / ascii-piet bytes)

In ascii-piet, a represents a dark blue cell, and u is a light magenta cell. (x and symbols and digits do not exist.) This program has only one dark color but four different light colors, so I had to rotate the hue so that the resulting ascii-piet representation contains neither a nor u.

The program itself is pretty simple:

4 dup dup * * 1 + outC
• Could you save a few bytes by expanding the 4 into an 8 through the black region, and removing a dup and a *? Jul 12 at 20:47
• @emanresuA It would have to be 16 rather than 8 (64 is 4*4*4), which would increase the size. Jul 12 at 21:03
• @DLosc What I meant was 8 dup * Jul 12 at 21:08
• @emanresuA Ah, I see. That still wouldn't save bytes, though? It would be the same dimensions, and with ASCII-Piet it would actually increase the bytecount (since black codels at the ends of lines can be left implicit in ASCII-Piet). Jul 12 at 21:12

# MATL, 5 Bytes

'b'qc

Try it online!

• It's annoying that this requires the c, but unfortunately that behavior is a MATLAB/Octave thing. Aug 19, 2016 at 22:20

# SQF, 30 15

Using the function-as-a-file format:

toString[88-23]

Call as: call FUNCTION

Finally a challenge where SQF can compete. Not win, but actually competing is nice.

# Pyth - 3 bytes

.HT
• @ColdGolf accept the first one. Aug 20, 2016 at 21:17
• also mine is 3 bytes so it can't win. Aug 20, 2016 at 21:18

## Snowman, 14 bytes

{8vn2nPNiNwRsp

Explanation

{               # activate bdg
8              # set b to 8
vn            # no-op
2           # set d to 2
nP         # set b to 8^2=64
NiN      # set b to b+1 = 65
wR    # wrap in array
sp  # print

Try it online

• ......You rang?
– user18932
Aug 23, 2016 at 15:24

P;>'@

Try it online!

# Befunge-98, 6 bytes

'Lb-,q

Very basic: 'Lb- pushes (76-11 aka 65), , prints, q quits because using @ is too boring.

## Caker, 24 bytes

ωΩθΩθθθθθΩθΘ

Body must be at least 30 characters; you entered 29.

# Perl 6, 14 bytes

print 'B'.pred

pred is short for "predecessor"

## WolframAlpha, 10 bytes

chr(88-23)
• Do you mean "Wolfram Language"? Aug 21, 2016 at 3:30
• @ColdGolf WA is a program using Wolfram language. It can also be called from Mathematica by typing equality sign twice (==). Check the link. Aug 21, 2016 at 3:35
• Are you implying I can't use WA? Aug 21, 2016 at 3:38
• Nope, it was just an interesting thing. Aug 21, 2016 at 3:42

## 3var, 1411 8 bytes

iii       # set A to 3
s      # square A to 9
d     # decrease A to 8
s    # square A to 64
i   # increment A to 65
P  # print A as ascii

Try it online

Saved 3 bytes thanks to Joffan.

• Is there a reason to involve R and B - why not iiisdsiP? Aug 21, 2016 at 3:21
• @Joffan: You are of course correct. There's no reason at all to use R. Thanks! Aug 21, 2016 at 9:21