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


Dd*d[$]nnn  Try it online! This prints 13 (D) squared, twice # Perl 6, 11 bytes,$165,00010 bytes, $177,147 12 bytes,$150,000

'$'~㉝*ↁ '$'~۳¹¹

*Ouo'ე'$/@  Try it online! An interesting problem, was hoping to get this down to 7 or 8 bytes, but it proved difficult. Pushes the ე and$ characters to the stack, outputs the $, multiples top of stack, outputs the number and halts. Still hoping to find a lower byte option # Swift,$131072 (13 bytes)

"$\(MAXPHYS)"  In Swift Playground it prints "$131072"

# brainfuck, 34 bytes, $69999 +[->-[---<]>-]>.[-->+++<]>.+++....  Try it online! ### Explanation: +[->-[---<]>-]>. Generate and print 36 ($)
[-->+++<]>         Divide by 2 and multiply by 3 to get 54 (6)
.        Print 6
+++.... Print 9999


# Hexagony, 12 bytes, $122122 D{y@!!<'*;z/  Try it online! # ><>, 8 bytes,$210196

'o+n+|V$ Try it online! ### Explanation: ' Push the rest of the code to the stack o Print the$
+n      Add the top two and print as a number (210)
n+|    Add the top three and print as a number (196)
o+       Error as the stack runs out


# PHP, 18 bytes, $114431 This was actually a very quick challenge, but fun! $<?=ppuurp^AAAAAA;


Simply writes $114431 (excluding the warnings). Tricks I've used: • PHP will output anything outside it's opening and closing tag (saves 3 bytes vs '$'.[...])
• The opening tag <?= has the same effect as <?php echo [....]; (saves 8 bytes)
• You don't need to use quotes for "strings" that don't have spaces or start with numbers.
This makes it so PHP parses it as a constant.
Non-existing constants are converted to string (ex. AAAAAA is the same as "AAAAAA").
(saves 4 bytes - 2 bytes per "string")
• You don't really need the closing tag, and PHP advices you to not include it if it is a page that shouldn't have output.
(Check https://stackoverflow.com/a/19953547/2729937 for more).

# T-SQL, $60,738.58 (37 bytes)$65,025 (36 bytes)

PRINT CONCAT('$',SQUARE(ASCII('ÿ'))) --$65025
PRINT FORMAT(SQUARE(ASCII('ÿ')),'C')        --  $65,025.00  Played a bunch with the UNICODE() function (code pages are weird!), but found that ASCII('ÿ') is 255, which squares up nicely to$65025.

Prior answer ($60,738.58, 37 bytes): PRINT CONCAT('$',PI()*EXP(PI()*PI()))        --  $60738.6 PRINT FORMAT(PI()*EXP(PI()*PI()),'C') --$60,738.58


The latter has a more nicely formatted output, but it is unclear whether the comma is allowed by the rules.

# Pascal (FPC), $72089 33 bytes begin write('$',$AFFFF div$A)end.


Try it online!

Found by playing with arithmetics and hexadecimal constants. See below for more interesting answers.

### Pascal (FPC), $54872 47 bytes begin write('$',ord('&')*ord('&')*ord('&'))end.


Try it online!

• var x:byte=ord('&');begin write('$',x*x*x)end. saves a byte, but does not increase salary. – Jonathan Allan Aug 25 '18 at 17:31 # Bubblegum,$260847 (6 bytes)

00000000: 03b3 c759 0bf8                           ...Y..


Try it online!

# ><>, 7 bytes, $232110 'onnè$


Try it online!

Explanation (simple):

'onnè$' : Start putting chars onto the stack. o : Print the stack top nn : Print the stack top as numbers è$ : Errors the program


# Haskell, $99999 (15 bytes) pred<$>"%:::::"


Try it online!

# APL $130189.4947846055 (18 15 bytes, 10 9 characters) Thanks to @Ross Presser for pointing out the byte length and for saving a character. Byte length determined using Python's len function. '$',!○*≡⍬
=> $130189.4947846055  Can be run on repl or offline if you have an APL interpreter e.g. NodeJS + NGN APL. The maximum for the length is$177827.9.

### How it works

⍬ is the empty vector and the single argument form of ≡ obtains the depth of the argument (number of nested arrays, effectively). This can be used to obtain the number 1 in order to perform further math operations, as a vector containing only scalars (or nothing at all) has depth 1.

!○* are the factorial, pi times X, and e^x functions, respectively. APL operates right-to-left, so the value 1 is passed to these functions RTL and this expression computes (pi * e)!.

Then the dollar sign must be prepended by concatenating (,) the string value with the computed value.

Note: I did this mostly by trial and error. Often, using exponentiation after multiplication resulted in values that were way too large for the byte count. There might be a more optimal combination of operators.

• here's a permalink for your answer (although it only evaluates as an integer, which loses you 49 cents). "10 bytes" is only accurate if you are using IBM Codepage 907. – Ross Presser Sep 4 '18 at 10:23
• And you can save a byte by doing simply ≡⍬ instead of ⍬≡⍬ – Ross Presser Sep 4 '18 at 10:28

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

# PowerShell 5.1, $77126$85184$101101$105105, 2521 20 Bytes

"$"+($x=+'i'[""])+$x  or +'i'['']|%{"$ $_$_"}


or

$x=+'i'[''];"$$xx"  +10k thanks to AdmBorkBork +16k thanks to Mazzy +4k thanks to Mazzy again +2 solutions thanks to Mazzy, the absolute Maddest Lad With a little help, we hit the 100k mark. We have "i" index into itself to do some cheeky casting and then concats that to itself. • You can golf some bytes (and thus improve the salary) using + instead of [int] like follows -- "$$(+[char]"C")"+(+[char]'~') – AdmBorkBork Aug 28 '18 at 14:54 • Take it: "$"+($x=+'e'[+$i])+$x,$101101, 21 bytes. You should start the script on a clear Powershell with Set-StrictMode -Off (default mode). If $i have defined then clear the var by command rv i – mazzy Sep 13 '18 at 0:38 • Enjoy the bonus: "$"+($x=+'i'[""])+$x, $105105, 20 bytes – mazzy Sep 13 '18 at 11:17 • One more 20 bytes :) $x=+'i'[''];"x$x". Note double  used for comment on stackexchange only. Replace double  on single one or use allowed space $x=+'i'[''];"x$x". – mazzy Sep 14 '18 at 7:48 • Newerending story... +'i'['']|%{"$ $_$_"} with Scrooge McDuck emoji string _$_ – mazzy Sep 14 '18 at 8:17 # Brain-Flak,$55555

([(((()()()()){}){}())](((((({})({}()){}))))))


Try it online!

# Brain-Flak with -r flag, $57777 ((((((((()()()()){}){}())(({}()){}))()()))))  Try it online! # gvm (commit 2612106) bytecode, 7 bytes ($232255)

░$áΦá └ program shown in cp 437 encoding. It seems I can't paste a non-breaking space correctly here :( (ff in cp-437, U+00a0 in unicode) -- the space in the code should be one. Output: > ./gvm salary.bin$232255


Hexdump:

> hexdump -C salary.bin
00000000  b0 24 a0 e8 a0 ff c0                              |.$.....| 00000007  Disassembled: c:0100 b0 24 WCH #'$'    ; write character $c:0102 a0 e8 WUD #$e8    ; write unsigned byte $e8 (232) c:0104 a0 ff WUD #$ff    ; write unsigned byte $ff (255) c:0106 c0 HLT ; terminate  This is a pre-alpha version of a virtual machine I'm working on -- hope this is still allowed, the commit that correctly executes this code is from yesterday :) # Charcoal, 6 bytes,$252525

$×³Ｉ²⁵  Try it online! Link is to verbose version of code. Works by casting the numeric constant 25 to string and repeating it 3 times. The best Charcoal can do in 5 bytes is$222222:

$×⁶Ｉ²  Try it online! Link is to verbose version of code. # LOWER,$40457

72 bytes

ₔₓ₃₆ₔₓ₅₂ₔₓ₄₈ₔₓ₅₂ₔₓ₅₃ₔₓ₅₅


Try it online!

ₔₓ<num> - print a character with ASCII code <num>

# Japt, 7 bytes, $232,255 '$+#è#ÿ


Try it online!

• Same idea I had. The byte count on TIO is wrong, though, it's actually 9 bytes. The highest you can manage in 7 is 232256. – Shaggy Aug 25 '18 at 17:57
• @Shaggy didnt notice, couldnt get 232256 though – Luis felipe De jesus Munoz Aug 25 '18 at 19:43
• Sorry, that was a typo; should've been 232255. – Shaggy Aug 25 '18 at 19:47
• @Shaggy The byte count is correct in Japt’s native ISO-8859-1 encoding. – Anders Kaseorg Aug 29 '18 at 23:44

# Java

program, 73 bytes, $40033 (of max 40041.67) interface G{static void main(String[]a){System.out.print("$"+'+'*'Σ');}}


Explanation

It uses the product of the ascii character + (43) with the greek unicode character Σ (931).

Lambda, 35 bytes, $69388 (of max 69494.27) ()->System.out.print("$"+'L'*'Α');

• It shouldn't change your solution much, but the required format is dollar sign first, then value – Nicola Sap Aug 25 '18 at 20:53

# ><>, 8 bytes ($196196) code: e|noi:*  input: $


Try it online!

My first ever ><> entry; ><> is a weird language and it took me a while to find a way to print the $ without using a ton of characters. If it wasn't needed, f|n:* would print 225225 inside the$299069 limit. Instead, stuck with 8 characters and a $210224 limit. But hey,$196196/yr. is some serious money.

# How it works

 e|noi:*
>          Fish starts top left, pointing right
e         Push 14 onto the stack (stack: [14])
|        Mirror. Fish is now moving left
e         Push 14 onto the stack again, wrap around (stack: [14,14])
*   Pop x and y, multiply, push result (stack: [196])
:    Duplicate top of the stack (stack: [196,196])
i     Read a character from input as a string ($), push to stack (stack: ['$',196,196])
o      Pop and print it as a character (output $, stack: [196,196]) n Pop and print as a number (output $196, stack: [196])
|        Mirror. Fish is now moving right
n       Pop and print as a number (output $196196 stack: []) o Pop, stack is empty: error; program terminates  • Challenge said no input... Nice language, still. – Stéphane Gourichon Aug 26 '18 at 7:19 • @StéphaneGourichon Oh shoot! :\ – Draco18s Aug 26 '18 at 15:54 • Revisted this a couple times and the best I can get without input is e6|n:*o*} (9 char, $196196 and too high). Managed an 8-char, but c3*:|no* only returns $129636 which is a third lower. – Draco18s Aug 29 '18 at 19:13 # Perl 5.26.2, 12 bytes,$146002

say$]^"\x11\x0e\x01\x06" Hex escapes only shown because ASCII control chars are filtered out. Try it online! You can get a bit more with different Perl versions, for example$155012 with 5.25.12.

• Where's the dollar sign? – Zaid Sep 2 '18 at 19:44
• @Zaid The dollar sign comes XORing 0x35 (ASCII char 5 from the Perl version string in $]) with 0x11, resulting in 0x24 (ASCII char $). – nwellnhof Sep 3 '18 at 0:55
• Wait, this source does contain numbers — namely 0, 1, 6. – hidefromkgb Sep 13 '18 at 0:42
• @hidefromkgb Hex escapes like \x11 are ASCII control chars in the actual code. Have a look at the TIO link. – nwellnhof Sep 13 '18 at 12:22

# K (oK), $130,331.00 of a maximum of$131,199.00 (15 bytes)

"$",$*/i$"//;"  Try it online! Output contains quotation marks because that's how strings are represented in K. ### How: "$",$*/i$"//;" # Anonymous function, no arguments.
"//;" # The string '//;'
i$# coerce into integers (uses the ascii values of '//;', which are 47 47 59) */ # product of the list (47² × 59 = 130.331)$           # convert into a string
,            # and prepend
"$" # a dollar sign  • You might want to change your decimal format to US instead of Europe (commas as thousand separator and dots as decimal separator). The leader-board in the question currently shows your answer at the bottom with$130.33.. ;) Nice answer though, +1 from me! – Kevin Cruijssen Aug 27 '18 at 20:46
• @KevinCruijssen just did that, thanks! – J. Sallé Aug 27 '18 at 20:57
• You don't need to cast it, "$",$*/"//;" works just as well and puts you at a higher cap – Thaufeki Sep 28 '18 at 3:40

# Excel: 23 bytes, $93648.047476083 ="$"&PI()^(ARABIC("X"))


Max is $95214.73 (2 bytes can be saved, but no salary improvement by removing parentheses around the ARABIC function) ## Excel: 15 bytes,$131196.0508, Max $131,199 (Cheat) ="$"&NOW()*PI()


For certain values of now() :-) (Set system date to 5/2/2014)

# Befunge-93, $154836$164220 $165554, 12 11 bytes ".;=$",**.@


Try it online!

I calculated the Number using the ASCII Values of the letters

46 * 59 * 61 = 165554


Thanks to Jo King for golfing 1 byte and raising my salary by $9384$10718.

• You can remove the \  like so – Jo King Aug 27 '18 at 22:20
• @JoKing Thank you, I think the code is now only improvable by changing the ASCII Characters, but I haven't found a better combination yet. – ItsJ0el Aug 28 '18 at 6:21
• 6 dollars off the max – Jo King Aug 28 '18 at 6:35

# ShinyLisp, 8 bytes, $204864 S"$"DpEv


Ungolfed:

(strings "$" drop even)  drop is a function which discards the first few elements of a list. When used as a number, it's equal to 2048. even checks whether a number is even, but when used as a number, it's equal to 64. strings concatenates strings, so the two functions get cast to numbers which then get cast to strings. ## MATLAB, 22 bytes,$99649.9031

['$',num2str(''''^pi)]$99649.9031


Just bad luck the character ' is part of the syntax so to escape it I needed to repeat it.

This solution and all the other below are interchangeable with the sprintf function. Ex sprintf('$%f',''''^pi) will return the same output. ## Older solutions: 23 bytes,$80662.6659

['$',num2str(pi^pi^pi)]$80662.6659


24 bytes, $74704.2869 ['$',num2str(now/pi/pi)]

$74704.287  Explanation: the now function return a serial date code (today 29-August-2018 => 737301). Just needed to divide that a bit to make the salary fit the cap. Nice thing about it, if you run it tomorrow you'll get a bit more (pennies only though...) # C,$80010 (29 bytes)

o(){printf("\$%d",'\aq'*'*');}


Try it online!

I did a brute-force search on all expressions x * y, where x is a 2-character literal and y is a char. The desired result has a rather uncomfortable value, which requires one of the chars to be escaped: \a (which is equal to 7).

For a 29-byte program, the maximum that may be displayed is 80020.

Fun fact: my search program printed all solutions literally at first. Imagine what it did when it output all these \a characters...

• You don’t have to escape that. And why not use a 3-character literal? – Anders Kaseorg Aug 30 '18 at 3:59
• No real reason to avoid these literals, other than them being ugly. You might want to post your solution, because it's different/better than mine. – anatolyg Aug 30 '18 at 10:05
• Do the rules allow you to skip main`? This code doesn't compile... – l33t Oct 20 '18 at 14:10