# Produce the number 2014 without any numbers in your source code

Note to challenge writers as per meta consensus: This question was well-received when it was posted, but challenges like this, asking answerers to Do X without using Y are likely to be poorly received. Try using the sandbox to get feedback on if you want to post a similar challenge.

It's 2017 2018 2019 2020 2021 2022 already, folks, go home.

So, now that it's 2014, it's time for a code question involving the number 2014.

Your task is to make a program that prints the number 2014, without using any of the characters 0123456789 in your code, and independently of any external variables such as the date or time or a random seed.

The shortest code (counting in bytes) to do so in any language in which numbers are valid tokens wins.

var QUESTION_ID=17005,OVERRIDE_USER=7110;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>

• Even though numbers are ignored in brainfuck, I thought I'd post one anyway. 32 Chars: ++++++[>++++++++<-]>++.--.+.+++. Apr 1 '15 at 21:37
• Brainfuck isn't a valid language for this challenge. Apr 1 '15 at 22:49
• I know. That's why I posted it as a comment Apr 1 '15 at 22:51
• I wonder if this question gets a small spike in popularity around New Year's. Dec 26 '15 at 23:28
• Waiting for "Come on folks, don't you realize it's 2016?" :) Jan 4 '16 at 23:35

## TinyMUSH, 16

We need more MUD language entries.

\encrypt($"#&,.)  # Lua - 30 bytes b=#" "print(b..b-b..b/b..b+b) # is the length operator, so b = 2. • Would b/b work? – Lynn Nov 8 '14 at 16:20 • @nooodl Good suggestion; indeed b/b can replace b-#" " and save 3 characters. Nov 10 '14 at 0:56 ## C++ 30 main(){cout<<('&')*(']'-'(');}  • Why do you need the brackets around '&'? Does main(){cout<<'&'*(']'-'(');} not work? Mar 24 '15 at 7:39 # x86 machine code, 19 bytes B8 3A 0E 2C 08 CD 10 2C 02 CD 10 04 01 CD 10 04 04 CD 10 Assembly code equivalent: mov ax, 0E3Ah; ah = 0Eh (bios teletype), al = 3Ah (ascii semicolon) sub al, 08h; ascii 2 int 10h sub al, 02h; ascii 0 int 10h add al, 01h; ascii 1 int 10h add al, 04h; ascii 5 int 10h  Yeah, I know: it logs 2015 rather than 2014. But seeing that this challenge is old and now the year is 2015, it seemed more appropriate to use the current year (it's my excuse for not "going home" :) ) Note: This was tested using DOSBOX • You have numbers in your source. Jan 31 '16 at 11:06 • @ElliotA. Read the challenge: "without using any of the characters 0123456789"; numbers = characters representing numbers. Jan 31 '16 at 21:49 ## JavaScript (19) Obvious cheating, but these expression ran in REPL print strings "2014" and "2015": ''+'ߞ'.charCodeAt() // 2014 ''+'ߟ'.charCodeAt() //2015  TIL: .charCodeAt implicitly converts it's first argument to 0. # Vitsy, 5 4 Bytes, 3 Characters When in Rome... 'Nߞ Get the character with the value 2014 and then print it as a number. Simple. ### More Interesting Version (1210 9 Bytes): "ca-^b-N- My language supports hexadecimal, too. ;) " Capture the entire source as string by looping around the source. ca- Push 2 to the stack ^ 45^2 b- -11 N Output as a number. - Only here for character value 45.  • Am I right that this language is newer than the question? Besides, I believe this question is already 'closed'(winner chosen, and even an edit at the start discouraging more replies) Nov 1 '15 at 11:42 • @sanchises You're absolutely right - I'll pull my edit request. I'd still like to add it to the list, though, even if marked as a new language.. :D Nov 1 '15 at 11:46 • Just put it under 'invalid' I guess, there's a section for that at the end. Nov 1 '15 at 11:49 • Changed the edit suggestion. :P Forgot about the 'newer than question' thing, but I should've considered that. Thanks, @sanchises Nov 1 '15 at 11:50 # Perl 5, 8 28 bytes say 38*53 Seems to do it. Oh, without cheating ? $z=ord("!")*ord("=");say++$z  • D'oh. I thought it was without any of those numbers. Dec 2 '15 at 4:24 T-SQL 27 bytes PRINT ASCII('')*ASCII('j')  Note that the character that isn't rendered here is the DC3 (CHAR(19)) in the first set of quote marks. It's unicode U+009F which, it would appear, doesn't copy and paste here too well but I can assure you it works in SQL Management Studio. # Retina, 24 bytes (newer than challenge) Note the trailing space on lines 2 and 3. Language is newer than the challenge.  xx x xxxx +(x)*$#+


Try it online

# Factor, 10 bytes

Not gonna beat my winning answer, but as a follow-on to the other "2014th Unicode char" answers:

CHAR: ߞ .


Prints 2014.

# Quetzalcoatl, 114 5 bytes

## Noncompeting because this language is from 2016.

::ord('ߞ')


The box should be replaced by Unicode character 2014.

### Edit

This is for an old version of Quetzalcoatl. New version:

'ߞ'O

• This language is new though, this year. Mar 2 '16 at 22:53
• There is no ASCII character 2014... it has to be Unicode to go that high. Mar 4 '16 at 19:40
• If Quetzalcoatl is newer than the challenge, you're answer is non-competing and should say so in its body. Also, I'm not aware of any encoding in which ߞ would be a single byte. Apr 8 '16 at 17:21

# Mathematica, 10 bytes

N[E,E^E^E]


Prints the decimal expansion of the number e to over 3.8 million decimal places. The first occurrence of 2014 in that decimal expansion starts at the 3180th decimal place.

# VBA, 21 characters

?cells(,"BYL").column


Write and run the above code in the Immediate Window. Basically, the code converts column name BYL to its column index (2014).

• For future reference, this may be rewritten as ?[BYL:BYL].Column Sep 3 '17 at 21:04

# Actually, 15 bytes

This language was created long after this challenge was made, but I thought I'd still try my hand at it. This answer avoids all numerals, including Actually's ² for a*a. Golfing suggestions welcome. Try it online!

╜⌐u;*⌐úl¬¬τu;*-


Ungolfing

╜    Push register 0 (initialized to 0).
⌐u   Add 2 and increment. Returns 3.
;*   Duplicate and multiply. Equivalent to squaring. Returns 9.
⌐    Add 2 again. Returns 11.
úl   Pushes the lowercase alphabet and gets its length. Returns 26.
¬¬   Subtracts 2 twice. Returns 22.
τ    double(). Returns 44.
u    Increment. Returns 45.
;*   Square. Returns 2025.
-    Subtract. Returns 2025 - 11 == 2014.


# Vim 8.0, 15 bytes

:h u
ggf:wywZZp


I didn't see a vim answer yet, so I figured I'd add one. This opens up a helpfile, so it is specifically vim 8.0, since it might not work with a future version that updates that file.

• Clever! In my case :h followed by 9wywZZp works. So down to 10 symbols/bytes Dec 5 '16 at 17:22
• @defhlt OK, good to know! Although technically that doesn't work because it uses the digit 9. You could do f:w in place of 9w for only one byte more. Which version of vim do you have? Dec 5 '16 at 17:25
• Also, !!date +\%Y is 12 symbols (assuming you are reading this from 2014) Dec 5 '16 at 17:26
• You are totally right! I use nvim 0.1.6-dev. Dec 5 '16 at 17:28

# SmileBASIC, 10 bytes

?&HFBC>>!.


&HFBC is hexadecimal for 2014*2, which is right shifted by not(0.0)

?ASC("ߞ") looks shorter, but it's actually the same length when saved in UTF-8, and about 100000x more boring.

# Braingolf, 3 bytes

#ߞ


Try it online!

The ordinal of ߞ is 2014, # pushes the ordinal of the next character to the stack, and Braingolf implicitly outputs the last item on the stack.

• Braingolf is your language, right? Jun 6 '17 at 19:11
• @MDXF Indeed it is Jun 6 '17 at 19:46

## JavaScript, 81 76 bytes

l="length";alert(("hi"[l]<<"javascript"[l])-"wow"[l]*"hello death"[l]-true);

# Lua, 27 bytes

Should work in Lua 5.1, Lua 5.2, and Lua 5.3.

x="ɅɅ"print(x:byte()..#x)


Try it online!

This is mean to be saved with the UTF-8 encoding. The first byte of the string is 201, and its length is four. Lua is mostly encoding agnostic, so as long as these things are true in whatever encoding, it works.

With only ASCII, 28 bytes:

x=""io.write(x:byte(y,#x))


Note: the string must contain ASCII 20 and ASCII 14 (which are not printable characters). y here is an undefined variable, so it is nil, which byte defaults to 1 in the first parameter.

# Charcoal, 5 bytes

Ｉ²⁰¹⁴


Try it online!

Language was created after January 1, 2014, but as Charcoal uses the superindices ⁰¹²³⁴⁵⁶⁷⁸⁹ to represent the numbers, the answer is valid. :-)

# Lua, 29 bytes

b=("").byte print(b"?"..b"?")


NB: the two question marks are substitutes for characters that are not appearing properly in the post. See the tio link below for proof.

Try it online!

As an interesting point, although this is not the case with Lua, a language with an implementation of pi to at least 3137 digits would be able to print pi and find '2014' at digits 3133-3136!

# √ å ı ¥ ® Ï Ø ¿, 8 bytes

TTX''_o


Try it online!

The rest of the code in the TIO link is the Python interpreter (because I can't be bothered to ask Dennis to add √ å ı ¥ ® Ï Ø ¿

# Python, 41 bytes

print(int(ord("j")/len("aa") * ord("&")))


Try it online!

• Welcome to the site! The aim of this question (and code golf in general) is to get the shortest functional code. You can remove the spaces around the * to start with. Jan 7 '18 at 20:51

# Pyt, 9 bytes

π!⬡⁻⁻⁻△⁻⁻


Try it online!

# LibreLogo (Paper Format: Tabloid), 55 bytes

The document must be in Tabloid Format for this method to work.

Code:

print ''.join(set(str(pagesize.pop()))).replace('.','')


Result:

Explanation:

pagesize                                           ; Returns [792.0, 1224.0] (Tabloid Format)
pagesize.pop()                                     ; Returns 1224.0
str(pagesize.pop())                                ; Returns "1224.0"
set(str(pagesize.pop()))                           ; Returns {u'2', u'0', u'1', u'.', u'4'}
''.join(set(str(pagesize.pop())))                  ; Returns "201.4"
''.join(set(str(pagesize.pop()))).replace('.','')  ; Returns "2014"


## Canvas, 7 bytes

ＡＡ＋ｑ⁷┤ｔ


Try it online!

ＡＡ       | Push 10 to stack twice
＋      | Add top two items in stack
ｑ     | Print top item in stack on current line
⁷    | Push 16 to stack
┤   | Decrement top item in stack twice
ｔ | Print top item in stack on current line, disable implicit output


# C, 24

(Using GCC-4.9.2)

f(){printf("%i",'Þ');}         (Properly formatted version on Pastebin)

IMPORTANT NOTE: There is a U+0007 in-front of the Þ character but stackexchange removes it for some reason. Make sure you edit it back in before compiling my code. Here is a pastebin of the code that does include the unicode characters needed.

# Perl 5 + Perligata, 25 bytes

Byte count uses the new rule that command-line switches for choosing appropriate modules don't count.

perl -MLingua::Romana::Perligata -e'MMXIVimum egresso scribe.'


Tested in Strawberry 5.26.0 with Perligata 0.601 (with " instead of ' in the above code).

# jshell, 5 bytes

How to make Java an useful code golf language? Simple, just remove the need to declare classes, methods, make things automatically print and so on.

+'ߞ'


# Stax, 4 bytes

ü◘♥┐


Run and debug (ha) it online!

Obligatory Stax answer. This unpacks to 2014`. Implicit print.

I haven't yet found a shorter version.