# Without using numbers, get the highest salary you can. But don't exaggerate!

As I'm applying for some jobs whose job advert doesn't state the salary, I imagined a particularly evil interviewer that would give the candidate the possibility to decide their own salary ...by "golfing" it!

So it goes simply like that:

Without using numbers, write a code that outputs the annual salary you'd like to be offered.

However, being able to write concise code is a cornerstone of this company. So they have implemented a very tight seniority ladder where

employers that write code that is b bytes long can earn a maximum of ($1'000'000) · b-0.75. we are looking at (these are the integer parts, just for display reasons):  1 byte →$1'000'000       15 bytes → $131'199 2 bytes →$594'603       20 bytes → $105'737 3 bytes →$438'691       30 bytes →  $78'011 4 bytes →$353'553       40 bytes →  $62'871 10 bytes →$177'827       50 bytes →  $53'182  ### The challenge Write a program or function that takes no input and outputs a text containing a dollar sign ($, U+0024) and a decimal representation of a number (integer or real).

• Your code cannot contain the characters 0123456789.

In the output:

• There may optionally be a single space between the dollar sign and the number.

• Trailing and leading white spaces and new lines are acceptable, but any other output is forbidden.

• The number must be expressed as a decimal number using only the characters 0123456789.. This excludes the use of scientific notation.

• Any number of decimal places are allowed.

An entry is valid if the value it outputs is not greater than ($1'000'000) · b-0.75, where b is the byte length of the source code. ### Example output (the quotes should not be output) "$ 428000"            good if code is not longer than 3 bytes
"$321023.32" good if code is not longer than 4 bytes "$ 22155.0"         good if code is not longer than 160 bytes
"$92367.15 \n" good if code is not longer than 23 bytes "300000$"            bad
" lorem $550612.89" bad "£109824" bad "$ -273256.21"        bad
"$2.448E5" bad  ### The score The value you output is your score! (Highest salary wins, of course.) ## Leaderboard Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language. To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template: # Language Name,$X (Y bytes)


where X is your salary and Y is the size of your submission. (The Y bytes can be anywhere in your answer.) If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

# Ruby, <s>$111111.111... (18 bytes)</s> <s>$111999 (17 bytes)</s> $123456 (16 bytes)  You can also make the language name a link, which will then show up in the leaderboard snippet: # [><>](http://esolangs.org/wiki/Fish),$126,126 (13 bytes)


var QUESTION_ID=171168,OVERRIDE_USER=77736;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.replace(/<(s|strike)>.*?<\/\1>/g,"");s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a1=r.match(SCORE_REG),a2=r.match(LANG_REG),a3=r.match(BYTES_REG);a1&&a2&&e.push({user:getAuthorName(s),size:a3?+a3[1]:0,score:+a1[1].replace(/[^\d.]/g,""),lang:a2[1],rawlang:(/<a/.test(a2[1])?jQuery(a2[1]).text():a2[1]).toLowerCase(),link:s.share_link})}),e.sort(function(e,s){var r=e.score,a=s.score;return a-r});var s={},r=1,a=null,n=1;e.forEach(function(e){e.score!=a&&(n=r),a=e.score,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.lang).replace("{{SCORE}}","$"+e.score.toFixed(2)).replace("{{SIZE}}",e.size||"?").replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);s[e.rawlang]=s[e.rawlang]||e});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){var r=e.rawlang,a=s.rawlang;return r>a?1:r<a?-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("{{SCORE}}","$"+o.score.toFixed(2)).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 LANG_REG=/<h\d>\s*((?:[^\n,](?!\s*\(?\d+\s*bytes))*[^\s,:-])/,BYTES_REG=/(\d+)\s*(?:<a[^>]+>|<\/a>)?\s*bytes/i,SCORE_REG=/\s*([\d',]+\.?\d*)/,OVERRIDE_REG=/^Override\s*header:\s*/i; body{text-align:left!important}#answer-list,#language-list{padding:10px;width:520px;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>Score</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><td>Size</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>{{SCORE}}</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>{{SCORE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> Edit: (rounded) maximum allowed score per byte count, for a quicker reference - text here: • This is one of the very few (imo) successful non-fixed-output no-input non-random challenge. Unique idea! – Mr. Xcoder Aug 26 '18 at 0:45 • Nice challenge! Can we output a fully formatted currency value, if desired? Like 80,662.67 instead of 80662.6659? Your rules seems to preclude the comma, which means I couldn't use any built-in currency functions. – BradC Aug 27 '18 at 19:07 • I hope you don't mind, I've added a variation of the Leaderboard Snippet that sorts by score instead of bytes. Excellent first challenge! – ETHproductions Aug 27 '18 at 19:27 • Just noticed the new contributor tag. Well-constructed challenge, with such a high upvote and a vast amount of answers in only a few days, I wonder if this could be eligible for this years' Rookie of The Year ;) – Shieru Asakoto Aug 28 '18 at 11:21 • I've nominated this challenge as a candidate for "Rookie of the Year - Challenges" category in Best of PPCG 2018 as I said back then. – Shieru Asakoto Feb 8 at 8:22 ## 108 Answers ## PHP, 18 Bytes 98301 Using the defined constants of php core. <?=E_ALL*SIGQUIT;  It's simple E_ALL = 32767 and SIGOUIT = 3 Output 98301  **No restriction on use of defined constants :D • Gonna fix it (should not post from my phone) – Francisco Hahn Aug 27 '18 at 16:07 • Actually the ouytput is 98301 – Francisco Hahn Aug 27 '18 at 16:32 # Pip, 192,450 (9 bytes) '.A'𮿂  Try it online! Boring "codepoint of Unicode character" answer. A more interesting (but slightly less lucrative) 9-byte approach is this: '.A'XPI  which gives 191,919 by string-repeating the codepoint of  (19)\pi$times (rounded down). Excel, 260847, (6 Bytes) (Max of 260847.43 at 6 bytes) =Row() In cell A260847 (or any other cell in the row), simply have =Row(). Row returns the row of the reference in question, and when nothing is given, simply returns the row of the cell that the formula is in. We can then use Excel's Accounting formatting to insert the  for us (or any other type of custom formatting). This makes us extremely efficient and effective! • Welcome to PPCG! While this is a clever idea, it is unfortunately not valid as you need to output the  as well! – Giuseppe Aug 29 '18 at 20:16 • Giuseppe: Is having the  displayed not valid? – Selkie Aug 29 '18 at 20:16 • Yep, the requirements are for a program/function that outputs a text containing a dollar sign (, U+0024) and a decimal representation of a number (integer or real) -- I missed this my first time as well! – Giuseppe Aug 29 '18 at 20:17 • One could also argue that the six bytes in 260847 (the cell's position) have to be included, since it is information available to the program. – Jonathan Frech Aug 29 '18 at 20:33 • @JayCe Loopholes that may be applicable include this and this. – Jonathan Frech Aug 30 '18 at 10:14 # brainfuck, 44 bytes, 57777 Omg, first time trying this thing.... I don't even know how I did it xD +++++++++[>++++>+<<-]>.>[>++++++<-]>-.++....  Try it online! # plain TeX (using pdftex), 91126 (24 bytes) $\number[\number~\bye


Output is printed into a PDF.

Explanation: \number prints the decimal place in the ASCII table of the following character.

# PHP, $122122 (17 bytes) $<?=$a=ord(z),$a;


first attempt, $80662, 25 bytes: $<?=(M_PI**M_PI)**M_PI<<!A;


test script

# Swift 4, $50653 (50 bytes) let a=UnicodeScalar("%")!.value;print("$\(a*a*a)")


Try it online!

• Using your code you can golf this a bit (I have never done swift). Move the variable into the code itself and use a higher char for the unicode value and replace the aaa with a single call. tio.run/##Ky7PTCsx@f@/oCgzr0RDSSVGIzQvMzk/… – Teal pelican Sep 4 '18 at 13:36

# BASH, $82154 (28 bytes) printf \\b!T|xxd -p|tr$[] $ This one requires an ASCII-capable machine, as \b, !, T must have code table positions 0x08, 0x21, 0x54 respectively. $[] is an empty arithmetic context whose result is 0.

## Python 3, $78011 & 23 bytes print("$",ord("𓂻"))

This is really simple, I just used the largest ordinal value I could find.

Try it online!

# Backhand, $189642 (9 bytes) ""o@$*O}


Try it online!

This was a bit of a weird one. The unprintable in the middle has a char value of 24.

### Explanation:

Note that the pointer typically moves three steps at a time

"            Starts a string literal
@        Pushes some characters to the stack
Bounces off the edge and go left
"  $O Push some more chars and end the string literal Bounce off the edge and go right o Output the$
*       Multiply the O (79) by the unprintable (24) = 1896
}    Step to the right, which bounces off the edge, so steps left instead
O     Output the 1896
"  $Start another string literal and reflect o * } Push chars and reflect o * Push more chars and reflect " End string literal$  O     Swap the o and * and outputs the * as a number (42)
@        Unprintable (ignored) and then terminates


Most of this was from accidentally using } (step right) instead of { (step left) as the last char, which led me to find out that this used the O (output number) twice, so I could avoid having to do too much more fiddling.

# Lua, $74088 (32 bytes) s='*'x=s:byte()print('$'..x*x*x)


Try it online!

### How:

s:byte()returns an integer equivalent to string s ASCII value, '*' value is 42, 42^3=74088. I guess this is the optimal solution for the size of the code I managed to think of, feel free to prove me wrong.

# Aheui (esotope), 30 bytes, $73636 밦밦따빠맣빠뱘휉망어  Try it online! ### Explanation: 밦: push 6, move cursor right by 1(→). 밦: push 6, → 따: mul(push 36), → 빠: dup(push 36), → 맣: print as character(36 > '$'), →
빠: dup(push 36), →
뱘: push 7, move cursor right by 2(→→).
휉: end.
망: print as integer, →
어: move cursor left by 1(←).


Note: Print instruction moves cursor in reverse direction if current storage is empty.

C (gcc) - 26 bytes - $53159 main(){printf("$%d",'ϧ');}


Try it online!

$<> -(o)~temp q=o+o+o+o -(t){t+q}{t<=q:->t}  Try it online! # Explained $<>               // Print a dollar sign and do not print a trailing newline.
-(o)              // Create a gather, and give it the label o. This creates a variable o, which keeps track of how many times this gather has been reached
// It is currently set to 1, and it will stay that way.
~temp q=o+o+o+o   // Create a variable q, containing the number 4.
-(t)              // Another label, another variable.
{t+q}             // print t + q, that is to say t + 4
{t<=q:->t}        // If t is not greater than q, jump to the gather labelled t
// (this automatically increments the t variable)


# Alternative solution: $66666, 31 bytes, but I did find a better solution, but I don't like it, because it abuses a bug in the interpreter: -(n){|}$<>
-(t){t<n+n:{n+n}->t}


Try it online!

The {|}` is a sequence - it outputs one string (the empty string, in this case) the first time the line is reached, and another string (which in this case is also the empty string) every subsequent time the line is reached.
This might not seem useful here, since we never return to that line. But in the current version of Inklecate, when a sequence occurs immediately after a labelled gather, the gather's readcount increments three times rather than the usual one.
This makes it easy to produce a 3, which we then use to print the number 6 five times.