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

?"$";#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

# Forth (gforth), $104857$125000 (16 bytes)

." $"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 ## 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$177827$125000 • 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

# MATL, 12 bytes, $155052 '$'t';I'hpVh

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

'$' String literal t Duplicate ';I' String literal, product of which results in highest bound by$_max / 38
h       Horizontal concat
p      Product (implicitly converts to int)
V     Convert to string
h    Horizontal concat

# Common Lisp, 59 bytes $46974 (defun x()(format nil "~{~a~}"(list'"$"(char-code #\띾))))

Try it online!

## JavaScript, 31 bytes, $74088 (x='*'.charCodeAt())=>'$'+x*x*x

The * asterisk character decimal code point 42 cubed is 74088 Try it online!

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
loop:
inc a
rst 38h ; putchar
djnz loop
halt

Try it online!

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