# 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! – Don't be a x-triple dot 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 ## 105 Answers # Python 2, 101106 101937 (21 bytes) Another Unicode character solution. This is the closest printable character I could find to the 21-byte maximum amount. Don't think Python can get any higher than this... print"",ord(u"𘸱")  Outputs:  101937  ## How it works "𘫲" is 4-byte char U+18AF2 "TANGUT COMPONENT-755". 0x18af2 = 101106 in decimal. Edit: Thanks to Dennis for pointing out that there's a usable character with a higher value and earning more money! "𘸱" is 4-byte char U+18E31. 0x18e31 = 101937 in decimal. • You don't have to use printable characters; U+18E31 will work just as well. Try it online! (using Cython because CPython would require a magic comment) – Dennis Aug 28 '18 at 15:29 • Oh that's great, thank you! In charmap there was a big gap after U+18AF2, thought it was a reserved area, but must have been the font I was using. – Aaron F Aug 29 '18 at 18:51 # Pepe, 74088 (30 bytes) reeeEeeEeerEeeEeEeEerEeeEereEE  Try it online! Explanation reeeEeeEee # print  rEeeEeEeEe # push 42 in stack r rEeeEe # cube of 42 (74088) reEE # output number  # brainfuck, 30 bytes, 77'777 -[[<->->+>++++<<]>-]>.<<<.....  BF-Crunch did most of the work for me. Try it online! # Actually, 8 bytes, 196418 '←┘F'+  Explanation: '←┘F'+ '← push the string "←" ┘ CP437 ordinal (27) F 27th Fibonacci number (F(27) = 196418)  convert to string '+ prepend a dollar sign  Try it online! ## Excel, 10 16 bytes, 177827 125000 =""&ROW() Not sure if this is a valid entry. It returns  following the current row number. So if you put it on row 177827 125000, it will return 177827125000 • As the number of digits in the number are the same length as the formula: &ROW() | 177827, you could just replace it to ="177827" for the same bytes but doesn't require getting to row 177,827. – Teal pelican Aug 31 '18 at 11:18 • Indeed, but the rules state that I cannot use numbers :) – Moacir Aug 31 '18 at 11:21 • I've been awake for far too long, completely forgot the challenge rules. I guess I shall leave my comment so people can see my idiocy. lol – Teal pelican Aug 31 '18 at 11:22 • I’m pretty sure the row number needs to be included in the byte count when used in this way, per this standard loophole, so this is 16 bytes, not 10. – Anders Kaseorg Sep 3 '18 at 17:47 • Got it. What is the correct course of action in this case? Do I delete my answer or edit it to be 16 bytes(Or less, considering I have to use the byte limitation of the question)? – Moacir Sep 3 '18 at 17:58 # Stax, 6 bytes (256256) ¥r○s╙  Run and debug it Unpacked version: VBc'L Full program VB Push "256" c Copy ' Push "" L Listify stack, producing ["", "256", "256"] Implicit flatten and output  # Shakespeare Programming Language, 18000 (207 205 bytes) ,.Ajax,.Ford,.Act I:.Scene I:.[Enter Ajax and Ford]Ajax:You be the square oftwice the sum ofa cat a big cat.Speak thy.You cat.Open heart.You be the cube oftwice twice the sum ofyou a big big cat.Open heart  Try it online! This language made this challenge simultaneously easy and hard. On one hand, there already are no numbers in the source code. On the other hand, the program size can get VERY long (the shortest header is 51 bytes, meaning I'm already out 947601.07!). Salary printed: 18000 Maximum salary: 18457.99 (rounded) • I believe your score is the number you printed, not the maximum salary. Interesting answer! – Conor O'Brien Sep 12 '18 at 21:22 • Thanks. I literally print , 1, and then 8000. – JosiahRyanW Sep 12 '18 at 23:30 • 20736 – Jo King Sep 12 '18 at 23:47 • How do you always do better than me? Clever use of the ASCII value of the dollar sign! – JosiahRyanW Sep 13 '18 at 0:07 # PowerShell, 1, 17 bytes Owner's salary: ""+[bigint]::One  Try it online! • You could do ""+[bigint]::One+[bigint]::One+[bigint]::One+[bigint]::One+[bigint]::One and get 11111, keeping you below the limit. – maxb Sep 13 '18 at 11:33 • **An entry is valid if** the value it outputs is not greater than (1'000'000) · *b*<sup>-0.75</sup> Why would the owner break the rules? :) – mazzy Sep 13 '18 at 11:35 • Thanks for TIO link. I have the error This site can’t be reached with this site – mazzy Sep 13 '18 at 11:37 • O, Powershell syntax highlighting! Thanks! – mazzy Sep 13 '18 at 11:39 • Yeah, It's Owner's salary. :) It's reguired [bigint] to write his salary – mazzy Sep 13 '18 at 11:41 # MathGolf, 353535 (4 bytes) 'W∙  Try it online! ## Explanation ' Push "" W Push 35 ∙ Triplicate top of stack  ## Disclaimer This language was created after the posting of this question. While the language is a general language, it is designed with numerical questions in mind. It contains a lot of 1-byte number literals, and other nifty things for number-related questions. It is still a work in progress. # Braingolf, 8 bytes, 209,764 #@#å+*  Output: 209764  209764 < 1e6 * 8-0.75 Try it online! • nice to see somebody else using braingolf! – Skidsdev Nov 30 '18 at 15:02 • #!@**8/ gives 209952 in the same number of bytes by doing (36^2)^2 / 8 – Skidsdev Nov 30 '18 at 15:13 # Flobnar, 16 bytes, 123904 ,g<+<>! @X:+<*\  Try it online! A little hard since I couldn't use numbers, but I got around it by using the get command. ### Explanation: ........ Start the program @...... Evaluate left and print result ......>. Evaluate to the right ......\ ......! Invert ....... Pop the top of the call stack (does nothing) ,g..... Print the cell at: ..:.... Top of the call stack (0,0 => ) .,.....! , returns 0, ! inverts that to 1 and ......\ \ stores it in the call stack ...<+<.. Return ((Z+Z)+(Z+Z))*((Z+Z)+(Z+Z)) ...+<*. Where Z is the return of the leftmost arrow ..g..... Return the cell at: .X:.... Top of the call stack (1,1 => X (88))  ## VBA, 21 bytes, 101,126 Max salary for 21 bytes: 101937.86 ?""ASC("e")&ASC("~")  Literally just prints , 101 and 126 without spaces Golfing wise: VBA will automatically concatenate a string followed by a number or function, so there is no & required between ?"" and ASC("e") If the & is omitted, then you get spaces between the strings and numbers - if this is a valid output then for 20 bytes you can use ?""ASC("i")ASC("~") to get  105 126 (max salary: 105,737.13) • You could just use ÿ to get a slightly higher salary. ?""ASC("e")&ASC("ÿ") 101255 – OWSam Aug 28 '18 at 15:01 # Common Lisp, 72447 (33 bytes) (format t"~d"(char-code #\𑫿))  The character is Unicode U+11AFF. Try it online! # Pyth, 161051 (11 bytes) +^hT/ThhZ


?"$";#R*#L  #R and #L are constants with values of 512 and 256. # x86 (32-bit) machine code,$124124

Hexdump (16 bytes):

b8 3a 1d e3 03 f7 e0 89 01 c1 e8 08 89 41 04 c3


Disassembly:

b8 3a 1d e3 03  mov eax, 65215802
f7 e0           mul eax
89 01           mov[ecx], eax
c1 e8 08        shr eax, 8
89 41 04        mov[ecx + 4], eax
c3              ret


I found the "magic" number 65215802 by brute-force search. Its square is hexadecimal F1C2C34323124. When interpreted as a 4-byte string, it's $124. After a shift by 8 bits right, it's 124, with a zero-byte string terminator. For a 16-byte program, the maximum that may be displayed is $125000.

# Python 2, $65536 (34 bytes) An answer using mathematical operators: t=True;t+=t;t<<=t;print"$",t**t>>t


## How it works

t=True;    # True evaluates to 1
t+=t;      # 1 + 1 = 2
t<<=t;     # 2 << 2 = 8

select'$'||unicode('𕍂')  Try it online! Inspired by T-SQL @BradC answer # FreeBASIC,$124095 (16 bytes)

?"$" &&hc &&hfff  prints $124095


? means print

&h is the hex prefix

& connects parts together

Tested using FreeBASIC online

." $"char 𞡈 .  Try it online! • +1 I feel silly for only now realizing that you don't need a space after the closing " to a ." word – reffu Aug 27 '18 at 16:46 # MATL, 12 bytes,$155052

'$'t';I'hpVh  (Maximum for 12 bytes is$155100)

Explanation:

'$'t';I'hpVh '$'             String literal
t            Duplicate

main(){printf("$%d",'*'*'*'*'(');}  Try it online! # K (oK), 13 bytes,$145794

Try it online!

"$",$*/"B//"


Run multiplication over the characters B//, it will convert them to their integer counterparts and give the result of B*/*/ (145794), String the result ($) and join (,) it to "$"

# Z80Golf, $123456 (12 bytes) 00000000: 0606 3e24 ffc6 0c3c ff10 fc76 ..>$...<...v


Try it online!

Assembly:

ld b, 6 ; loop 6 times
ld a, 24h ; '$' char rst 38h add 0Ch ; 30h='0' char loop: inc a rst 38h ; putchar djnz loop halt  Try it online! # Runic Enchantments, 6 bytes,$255000

Thought I'd hit up a few challenges with the language I wrote a few days ago. Entry is non-competing as the challenge was posted before I created the language (although I did not intentionally design the language to be particularly good against this one). TIO doesn't yet have an interpreter for it (coming soon I hope). Character set and execution is similar to ><>, but with an extended set of available commands, multiple IPs, and IP "energy" (some commands--such as o (sort)--require/consume mana and IPs with 0 mana are terminated).

## 2 IPs (because the language can): $148642 (max$155100)

>e'$@ FFm\>  Try it Online ### Explanation This will be a little hard to follow, but hopefully it makes sense. Instruction pointers wrap when they reach the edge of the program. > > Entry points (each IP begins with 10 mana) ---------------------- e Push 14 F Fizzle ---------------------- ' Enable single character read mode F Fizzle ----------------------$       Push '$' m Push current mana (8) ---------------------- @ Print stack ($14) and terminate
/       Reflect upwards
----------------------
$Pop and print (8) ---------------------- / Reflect right ----------------------$
mFF/       Push current mana (6), fizzle twice, reflect up
At this point the IP is in a loop. It will terminate
when it pushes a (2) and fizzles twice to end up with 0 mana

• Note that non-competing doesn't apply to new languages anymore – Jo King Sep 23 '18 at 5:18
• @JoKing Oh? I didn't find that on meta. – Draco18s Sep 23 '18 at 15:10
• Note that you can't use numbers in your source (the 5 is illegal). – Spitemaster Sep 27 '18 at 2:27
• @Spitemaster and updated. Both versions actually managed HIGHER outputs as a result. Heh. – Draco18s Sep 27 '18 at 20:26
• If I'm reading the challenge correctly, 7 bytes only allows for a maximum of $232368 – recursive Oct 3 '18 at 23:38 # Oracle SQL, 54 bytes ($50200)

select '$'||to_number(rawtohex('─↑'),'xxxx') from dual  Symbols must have codes 196 and 24 because 196 * 256 + 24 = 52000. Symbols may differ for different code pages, demonstrated result tested for code page 437. SQL> select '$'||to_number(rawtohex('─↑'),'xxxx') from dual
2  /

'$'||TO_NUMBER(RAWTOHEX('─↑'),'XXXX') -----------------------------------------$50200

SQL> exit;
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

C:\Windows\System32>chcp
Active code page: 437


# Oracle SQL, 44 bytes ($57343) select '$'||ascii(unistr('\DFFF')) from dual


Max allowed number in this case is 58534 but the max one in HEX without digits is DFFF.

SQL> select '$'||ascii(unistr('\DFFF')) from dual 2 / '$'||A
------
$57343  • Nice work. You should put the resulting salary in your header as well, so we can see that at a glance. – BradC Dec 3 '18 at 14:32 # Gol><>,$232104 (7 bytes)

$'onhè  Well, I don't think this can get much smaller or higher in price! (and I know that the last char is a 2 byte char, I included it in the byte count) There is a program that outputs a higher price, but it uses an error, in ><>, here is a link, which also works in Gol><> too! 5th version,$210104 (8 bytes)

$'ofe*nh  Only 120.1$ off from being the max score, whew!

4th version, $182182 in 9 bytes $'oed*:nh


3rd version, $168168 in 11 bytes '$'oce*:nn;


2nd version, $150150 in 12 bytes '%'Moaf*:nn;  Literally 2 minutes after I made the previous one, I figured out how to golf it more. 1st version,$121121, 14 bytes

d:+a+ob:*:n:n;


|

|

|

Yep, that's it.

This can probably be golfed better with more money.

## protected by Community♦Dec 27 '18 at 2:40

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).