| Bytes | Lang | Time | Link |
|---|---|---|---|
| 017 | Uiua | 251013T151100Z | ojdo |
| 336 | Python 3 | 180828T125809Z | ShadowRa |
| nan | Google Sheets | 250807T032002Z | z.. |
| nan | Bespoke | 250727T101506Z | Josiah W |
| 011 | Elixir | 250204T210418Z | TKDKid10 |
| nan | Mathematica | 180825T200212Z | LegionMa |
| 016 | Alice | 240609T211506Z | Julian |
| 010 | ><> | 240414T003659Z | Evylah |
| 033 | Forth gforth | 230525T221648Z | allisonl |
| nan | Vyxal RssṪ | 230522T002659Z | lyxal |
| 144 | Thunno 2 j | 230422T131143Z | The Thon |
| 255 | GolfScript | 230404T030423Z | Samuel W |
| nan | Julia 1.0 | 230330T152131Z | Ashlin H |
| 024 | Aheui esotope | 230331T045815Z | Bubbler |
| 008 | vemf | 230328T215052Z | mí |
| nan | Java 8 | 180827T071647Z | Kevin Cr |
| nan | Pyth | 230329T191908Z | CursorCo |
| nan | Vyxal | 230328T204930Z | Joao-3 |
| nan | Nibbles | 230322T173253Z | Adam |
| nan | Trilangle | 230214T195159Z | Bbrk24 |
| nan | Thunno KJ | 230207T191817Z | The Thon |
| nan | Rattle | 210719T032354Z | d01 |
| nan | Zsh | 220623T063857Z | pxeger |
| 006 | Vyxal ṡ | 220623T033421Z | naffetS |
| nan | Risky | 210614T190450Z | rydwolf |
| 008 | Pip | 180828T202707Z | DLosc |
| 007 | Hexagony | 210819T142158Z | Jo King |
| nan | Pyth | 180829T041706Z | Venerax |
| nan | Squire | 210614T221841Z | EasyasPi |
| nan | Knight | 210614T213826Z | EasyasPi |
| 014 | Rattle | 210617T015448Z | d01 |
| nan | Ly | 210614T220456Z | cnamejj |
| 020 | Python 2 Cython | 180828T140915Z | Aaron F |
| 009 | Pxem | 210602T134052Z | user1004 |
| 028 | Python | 210602T140137Z | zoomlogo |
| nan | BRASCA | 210602T071902Z | SjoerdPe |
| nan | Deadfish~ | 210103T081018Z | PkmnQ |
| 015 | Hexagony | 201109T222547Z | Undersla |
| nan | GolfScript | 200917T013302Z | 2014MELO |
| nan | LOLCODE 1.2 | 200509T223930Z | loohhoo |
| 019 | C# 19 Bytes | 200509T005107Z | loohhoo |
| nan | Whitespace | 200506T161518Z | Kevin Cr |
| 034 | Wren | 191206T152133Z | user8505 |
| nan | TSQL | 180827T191934Z | BradC |
| nan | Go | 191002T072727Z | Purple P |
| 015 | Zsh | 191002T021444Z | GammaFun |
| 010 | Cascade | 191002T005835Z | Jo King |
| 006 | Runic Enchantments | 180923T045945Z | Draco18s |
| nan | Keg | 190807T223121Z | Edgex42 |
| nan | 33 | 190808T023055Z | TheOnlyM |
| nan | Befunge93 FBBI | 190628T215711Z | negative |
| 043 | Ink | 190321T195135Z | Sara J |
| nan | Perl 6 | 190321T015219Z | bb94 |
| nan | cQuents | 190321T010450Z | Stephen |
| nan | Canvas | 190209T112246Z | dzaima |
| nan | Gol><> | 190205T165433Z | KrystosT |
| nan | C | 181218T180131Z | l33t |
| nan | Oracle SQL | 181203T142746Z | Dr Y Wit |
| 764 | Braingolf | 180927T022331Z | FatalErr |
| 026 | C gcc | 181130T092850Z | bznein |
| 030 | Aheui esotope | 181130T085012Z | cobaltp |
| nan | Z80Golf | 181003T231530Z | user3604 |
| 013 | K oK | 180928T024715Z | Thaufeki |
| nan | Lua | 180926T184129Z | Marcio M |
| nan | C clang | 180926T154720Z | user3604 |
| 031 | JavaScript | 180923T224509Z | guest271 |
| nan | Backhand | 180923T065622Z | Jo King |
| nan | Common Lisp | 180922T171121Z | JRowan |
| 020 | PowerShell 5.1 | 180828T010445Z | Veskah |
| nan | MathGolf | 180912T134627Z | maxb |
| 017 | PowerShell | 180913T112518Z | mazzy |
| nan | Python 3 | 180913T052749Z | Josh B. |
| nan | BASH | 180913T003309Z | hidefrom |
| nan | Shakespeare Programming Language | 180912T160931Z | JosiahRy |
| 012 | MATL | 180906T012312Z | Lui |
| nan | Stax | 180905T135843Z | wastl |
| nan | Excel | 180829T142529Z | Moacir |
| 009 | APL $130189.4947846055 | 180902T085320Z | Arc676 |
| nan | Swift 4 | 180904T130313Z | Arnab |
| nan | Ruby | 180825T162151Z | Doorknob |
| nan | Forth gforth | 180826T120755Z | Maya |
| nan | PHP | 180903T195226Z | Titus |
| 008 | Actually | 180826T045919Z | user4594 |
| nan | FreeBASIC | 180902T025622Z | Cyberian |
| 030 | brainfuck | 180831T142638Z | Dennis |
| 034 | brainfuck | 180826T010608Z | Jo King |
| nan | plain TeX using pdftex | 180831T111131Z | Skillmon |
| 044 | brainfuck | 180831T134818Z | Luis fel |
| 026 | SQLite | 180831T091517Z | digEmAll |
| nan | GS2 | 180830T145518Z | maxb |
| nan | Swift | 180830T125837Z | aix |
| nan | Pepe | 180826T043102Z | u-ndefin |
| nan | Python 2 | 180828T124417Z | Aaron F |
| nan | Haskell | 180830T044415Z | Anders K |
| 017 | MATLAB | 180830T025716Z | Max Radi |
| nan | dc | 180829T223135Z | Anders K |
| 006 | Excel | 180829T201410Z | Selkie |
| nan | C | 180829T174613Z | anatolyg |
| nan | Excel VBA 22 Bytes | 180828T102823Z | SQLSam |
| 022 | MATLAB | 180829T171920Z | Hoki |
| nan | R | 180825T152029Z | JayCe |
| nan | x86 32bit machine code | 180829T165028Z | anatolyg |
| 010 | SmileBASIC | 180826T073900Z | 12Me21 |
| 007 | ><> | 180829T145856Z | Teal pel |
| nan | PHP | 180827T074436Z | michael. |
| nan | Cubix | 180829T013801Z | MickyT |
| 043 | brainfuck | 180828T224759Z | Prismo |
| 008 | ShinyLisp | 180828T223619Z | Silvio M |
| nan | Bubblegum | 180828T212425Z | Anders K |
| nan | Common Lisp | 180828T205022Z | Renzo |
| nan | Pascal FPC | 180825T164230Z | AlexRace |
| nan | PHP | 180828T154442Z | aslum |
| nan | 180826T151056Z | pmysl | |
| nan | 180828T144912Z | Chronoci | |
| 839 | JavaScript ES6 | 180825T170435Z | Arnauld |
| 018 | PHP | 180827T102206Z | Ismael M |
| 011 | Befunge93 | 180827T081658Z | ItsJ0el |
| 009 | Befunge93 | 180827T110334Z | Jo King |
| nan | Gol><> | 180827T230117Z | xornob |
| 008 | ><> | 180826T222900Z | Jo King |
| nan | Excel 23 bytes | 180827T180735Z | dissemin |
| nan | K oK | 180827T195254Z | J. Sall& |
| 019 | Excel | 180827T142716Z | Keeta - |
| 000 | Perl 6 | 180825T211335Z | Sean |
| nan | PHP | 180827T160020Z | Francisc |
| nan | CJam | 180827T103633Z | maxb |
| 020 | R | 180825T150547Z | Giuseppe |
| 008 | Befunge98 PyFunge | 180827T124119Z | Vincent |
| 016 | Flobnar | 180827T115950Z | Jo King |
| 023 | JavaScript Node.js | 180825T235751Z | Shieru A |
| 012 | Perl 5.26.2 | 180826T163156Z | nwellnho |
| nan | Jelly | 180825T150335Z | Jonathan |
| nan | 05AB1E 5 bytes | 180825T181945Z | Mr. Xcod |
| 016 | Selfmodifying Brainfuck | 180825T153315Z | user2027 |
| nan | ><> | 180826T041152Z | Draco18s |
| 005 | Japt | 180825T205227Z | Shaggy |
| nan | 180825T203514Z | Master_e | |
| 255 | Japt | 180825T173823Z | Luis fel |
| nan | LOWER | 180825T183810Z | AlexRace |
| nan | dc | 180825T182444Z | H.PWiz |
| 006 | Charcoal | 180825T181724Z | Neil |
| nan | bash | 180825T180154Z | Doorknob |
| nan | vim | 180825T163450Z | Doorknob |
| 5292 | GS2 | 180825T171304Z | Jonathan |
| nan | gvm commit 2612106 bytecode | 180825T164109Z | Felix Pa |
| 2298 | Python 3 | 180825T163025Z | Jonathan |
| 005 | Jelly | 180825T163440Z | Dennis |
| nan | BrainFlak | 180825T163259Z | Nitrodon |
| 005 | GS2 | 180825T160625Z | Dennis |
| 005 | CJam | 180825T154314Z | Dennis |
| 012 | Hexagony | 180825T152143Z | user2027 |
| 008 | Jelly | 180825T151507Z | user2027 |
Uiua, 17 bytes, $103541
&p$"$_"⌈ⁿττ
Calculates, formats and prints the Python equivalent of f"${math.ceil(tau**tau)}", where tau equals 2*pi.
Python 3, 22 bytes, $97,336 salary
print('$',pow(*b'.'))
Takes advantage of bytes objects being iterables of int, which can be unpacked as sequential arguments to pow (in this case, it's equivalent to 46**3). Doesn't earn as much as the "boring" version taking the ordinal of a Unicode character worth the limit, rounded down, but it feels more fun, and achieves the same character count, just $1106 lower salary.
Google Sheets, $131199 (15 bytes)
="$"&CODE("𠀯")
Bespoke, $44211 (63 bytes)
now my own salary,chosen by the small code
XLIV_CC X I dollar-s
(44,211 in Roman numerals is X̅L̅I̅V̅CCXI.)
Elixir, 11 bytes, $165560
"$#{?𨚸}"
That's Unicode 165560, by the way. It's just $0.0261 below the max for 11 bytes.
This is assuming a similar rule to Haskell's about a script that is just an object/function.
Mathematica, 18 bytes, $107,163.49
$~Print~N[E^(E!E)]
Full program; run using MathematicaScript -script. Outputs $107163.4882807548 followed by a trailing newline. I have verified that this is the highest-scoring solution of the form $~Print~N[expr] where expr is comprised of Pi, E, I, and +-* /()!.
><>, 10 bytes, $177824
"ᖵ $"o*n;
Output: $177824
Explanation: This solution abuses string parsing.
- Push ᖵ (5557), [space] (32), and $ onto the stack.
- Output $
- Multiply 5557 and 32, giving 177824 and output it.
Forth (gforth), 33 bytes, $69696
CHAR , CHAR $ DUP EMIT OVER * * .
As much as I prefer jonesforth, gforth doesn't need trailing whitespace for . to work properly, so it saves a byte.
Vyxal RssṪ, 26 bitsv1, 3.25 bytes ($371091)
\$»*
If the interviewer is going to play dirty, then so am I. That'll teach companies to put arbitrary restrictions on their job offerings!
Thunno 2 j, 5 bytes, $262,144
kk³'$
Maximum for 5 bytes is $299,069
Explanation
kk # Push 64 to the stack
³ # Pop and push 64 ** 3
'$ '# Push the string "$"
# The j flag joins the stack
# (which is reversed in Thunno 2)
# Implicit output
Screenshot
GolfScript, 6 bytes, $255,255
"$\xFF").
The \xFF should be a literal 255-codepoint character, which is a fairly common technique in a lot of languages, however 255 specifically doesn't work. There are multiple different character sets with different characters for 255, and golfscript parses none of them correctly. In other words, pretend that \xFF is only one character long because it should be able to.
Julia 1.0, $101937 (23 21 bytes)
print(:$,Int(''))
To obtain the magic value, I rounded down the maximum score for a solution with this byte count, then converted it to a Char.
-2 bytes thanks to amelies: print :$ instead of '/$'
Aheui (esotope), 24 bytes, $91300
븖븜뜨쁘멓희다멍
Turned out to be surprisingly close to the bound of $92223.
밞밤따빠맣 9 4 * dup putchar; prints '$' (36) and leaves 36 on the stack
빠따밤밞 dup * 4 9; [1296 4 9]
망더 loop: print +; print 9, add, print 1300, break
희 halt
vemf, $200,000 (7 bytes) $210,000 (8 bytes)
+1 byte but also +$10,000 thanks to Julian
hhg+ª;`$
Explanation
; ' procatenate (reverse concatenate)
ª ' string representation of
hhg+ ' 210,000 (as 100,000+100,000+10,000)
' and
` ' character literal
$ ' dollar sign
Java 8, $131,199.00 (15 bytes)
v->"$"+'e'*'ԓ'
Explanation:
v-> // Method with empty unused parameter and String return-type
"$"+ // Return a dollar sign, concatted with:
'e'*'ԓ' // 131199 (101 * 1299)
\$131,199.00 < 131,199.31\$
I used a program to generate a printable ASCII character in the range [32, 126] which, when dividing 131199, would have the lowest amount of decimal values. Since 101 can divide 131199 evenly, resulting in 1299, I'm only 31 cents short of my maximum possible salary based on my byte-count of 15.
Vyxal, $177827 (10 bytes) $192450 (9 bytes) $210224 (8 bytes)
Thanks to Kevin Cruijssen for -1 byte and me for -1 byte
\$»∧<i»J
Explanation:
\$ # Push a dollar sign
»∧<i» # Push salary (base-255-compressed)
J # Concatenate
# Implicit print
Nibbles, $300000 (4.5 bytes)
"$"++;*;$
"$"++;*;$
"$" "$"
+ Add
+ add
; x :=
* multiply
;$ 1000
100
x
x
This assumes that we don't have to round up fractional byte counts. Another solution which works without this assumption:
Nibbles, $256256 (5.5 bytes)
"$"*+;$~ch~
"$"*+;$~ch~
"$" "$"
* Multiply
+ ~ add 1
;$ 1000
ch~ 256
Trilangle, $177827 (10 bytes)
"$𫚣o!@"
That CJK character is U+2B6A3, and 0x2b6a3 is 177827 in decimal.
Try it on the online interpreter!
Thunno KJ, $93,648.04 (7 bytes)
AwaA^'$
Explanation
Aw # Push pi
aA # Push 10
^ # Push pi ** 10
'$ '# Push "$"
# The flags concatenate them
# (Because of the way Thunno's
# stack works, the "$" gets
# put in front of the number)
# Implicit output
Rattle, $ 180180 (9 bytes)
$|bn*~/bb
Explanation
$| take "$" as a variable
b add "$" to print buffer
n get ASCII value of "$" (36)
*~ multiply by 10 ("~" acts as a zero here)
/ divide by 2
bb add to print buffer twice
(implicit output of "$180180")
Zsh, $138166 (14 bytes)
<<<\$$[##𡮶]
𡮶 is the Unicode character with codepoint 138166. This is the maximum integer score for 14 bytes.
Risky, $200000 (8 bytes)
\*\!/**+:}!_\*+
Explanation:
+ ; Join
! ; Pair of
\*\ ; "$" (6 * 6)
/** ; "2" (5 * 10)
_ ; Fill
:}! ; [1, 0, 2, 0, 1] (100 in base 3)
\*+ ; "0" (6 * 8)
Pip, $192,450 $202,020 (9 8 bytes)
O'$t+tMh
Explanation
Preset variables used: t = 10, h = 100
O'$ Output a dollar sign with no trailing newline
t+t 10 + 10
Mh for each digit in 100
The result is the list [20;20;20]
Output, concatenating items together (implicit)
Hexagony, $220220, 7 bytes
Ü~;]!@
This is my first Hexagony answer using []. This instruction switches between pointers and I've never really needed them before. Formatted, this is a size 2 hexagon.
Ü ~
; ] !
@ .
The Ü character has ordinal value 220, and we then negate that and output. (-220)%256 = 36, the ordinal value of $. Next we need to negate it back to 220, print twice and exit. However, if we implement this naively (just ~!!@), then that totals up to 8 bytes, which brings us over the $210224 limit. Instead we switch to the next pointer, which starts at the top right moving southeast. This executes the ~!, before wrapping round to the center, which pushes the value of Ü again, before switching again. Now we're on the right corner going southwest, printing again before wrapping around to the the center, negating and switching. Finally, we're in the bottom right moving west, which takes us to the @ to terminate.
To help visualise this, you can use the excellent Hexagony IDE at hexagony.net
Pyth, $161051 (11 bytes) $192450 (9 bytes)
+\$C"ˮǂ
Performs an integer conversion (via C) on two two-byte characters (ˮ, code point 0x2EE, and ǂ, code point 0x1C2), resulting in a final value of 0x2EFC2, i.e. $192450, the best integer score for this byte-count.
Old answer:
+\$^hT/ThhZ
Prepends a '$' sign to the result of 11^5.
Squire, $77777 (27 bytes) $80000 (28 bytes)
proclaim("$"+arabic(M*LXXX))
Outputeth:
$80000
True Squire programmers needeth not the characters 0123456789, rather, they useth Roman numerals.
# Proclaim to ye standard output...
proclaim(
# A dollar sign,
"$"
# and M*LXXX in thy strange Arabic numeral system,
# what one might write as 80000
+ arabic(M*LXXX)
)
- $2223:
M*LXXXshould've been obvious lol
Squire without Roman numerals (commit 93d3bf1), $55555 (38 bytes)
proclaim("$"+arabic(x=length(""+n))*x)
Sampersand doubteth my first solution, claiming that Roman numerals art "cheating". I contemplated catapulting him, but nay, I wouldns't want to slay the creator of this divine language.
Abuseth a blunder in commit 93d3bf1, where the program counteth "" + null as V characters long.
# Proclaimeth to ye standard output...
proclaim(
# A dollar sign,
"$"
# appended to the Arabic numeral 5
+arabic(
# Since n naught exist, it evaluateth to "null".
# Assigneth the length of this to "x"
# blunder: "null" art IV characters, not V, you jest
x = length("" + n)
)
# Multiplieth the string "5" V times to get "55555"
* x
# Reward: "$55555"
)
Knight, $126126 (13 bytes) $127127 (15 bytes)
O++"$"=d+A"~"Td
Output:
$127127
Now that ASCII is standard, this becomes very easy.
O++"$"=d+A"~"Td
A"~" # ASCII value of "~", 126
+ T # Add TRUE (coerced to 1) to get 127
=d # Assign 127 to d
+"$" # Prepend "$", this stringifies d
+ d # Append 127 again to get "$127127"
O # Output
- $1001:
+A"~"T
Rattle, 14 bytes, $122265
$|b<=@*~//*`*b
Try to outgolf this in Rattle!!!!!
Explanation
| takes anything to the left of it as input ("$")
b adds "$" to the print buffer
< moves the pointer left (wraps around to pointer = 99)
=@ sets the value on top of the stack to the pointer ( = 99 )
*~ multiplies this value by 10 ( = 990 )
// divides by two, twice ( = 247.5 )
*` multiplies this value by its rounded self ( = 247.5 * 247 = 61132.5)
* multiplies this value by 2 ( = 122265)
b adds this value to the print buffer, prints and clears buffer implicitly
Note that this works in the current version of Rattle, but the data tape may eventually be expanded past 100 slots (the TIO link here is permanent for the current Rattle version, 1.1.2)
Ly, $151515 (9 bytes) (11 bytes) (12 bytes)
'/' -::'$ouu
'/' -::'$ouu #
'/ # Push codepoint for "/" (47) on the stack
' # Push codepoint for " " (32) on the stack
- # Subtract yielding (15)
:: # Duplicate the top of the stack twice
'$:o # Push a "$" on the stack and print it as a char
uu # Print two entries on the stack as numbers (1515)
At the end of the code the stack contains 15 which is printed as a int by default, making the final concatenated output $151515.
Python 2 (Cython), $101106 $101937 $105737 (21 20 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("")
Outputs:
$ 105737
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.
Edit: Thanks to ovs for pointing out that the u prefix isn't necessary in Cython! An extra byte is gained: TIO
"" U+19D09. 0x19d09 = 105737.
NOTE: this works in TIO but fails in Python console with TypeError: ord() expected a character, but string of length 4 found
Pxem, 9 bytes (filename only), $192255.
- Filename (escaped unprintables):
$.p\300\377.n.n
Python (28 bytes; $15876)
print('$',ord('~')*ord('~'))
This is my first code golf answer. :)
BRASCA, $165100 (11 bytes) $192100 (9 bytes)
'$o'ÀHgn
Explanation
'$o - Print $
'À - Push 192
H - Push 100
gn - Concatenate and print
Hexagony, 15 bytes, $125125
j{F)))<'-;z/@!!
j { F
) ) ) <
' - ; z /
@ ! ! .
. . .
I originally had an answer similar to @user202729, but I realized that I could add 3 increments ")" to z in order to make it 125 and it kept it under 16 bytes ($125000 max).
GolfScript, $210210 (8 bytes)
"$i").+.
"$i" # Push this string
) # Separate last char and parse it to an integer, in this case it's 105
.+ # Add it to itself
. # Copy top of stack
In the end everything in the stack is concatenated. This is only $ 14.10 under the limit.
LOLCODE 1.2, 19 77 Bytes ($38100)
HAI 1.2
VISIBLE "$:[DIGIT THREE]:[DIGIT EIGHT]:[DIGIT ONE]:[DIGIT ZERO]:[DIGIT ZERO]"
KTHXBYE
The header HAI 1.2 and footer KTHXBYE are always required so not included in final byte count.
LOLCODE lacks a way to directly cast a char literal to a number, but you CAN give it a unicode normative name and it returns that unicode character. Changing the number name frequently changed the byte count so this was a bit tricky but this worked out fine :)
(Also had brainfart and forgot including 0123456789 wasn't allowed hence the 19 → 77. ^^;)
C# 29 20 19 Bytes
Assuming it's allowed to omit the otherwise required Main() entry point and assuming using System;...
Swapped to the interactive C# compiler and have saved now 10 bytes - 8 from removing Console and another by using an ascii character instead. And since it's the only line a semicolon isn't necessary. Not a bad salary :P
Write("$"+'Ϩ'*'m');
Output: $109000
Whitespace, $ 65,025 (37 bytes)
[S S S T S S T S S N
_Push_36_$][T N
S S _Print_as_character][S S S T T T T T T T T N
_Push_255][S N
S _Duplicate_255][T S S N
_Multiply][T N
S T _Print_as_integer]
Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Explanation in pseudo-code:
Print '$' to STDOUT
Integer n = 255 * 255
Print n to STDOUT
I've created this 05AB1E program to generate this largest binary value that is still within the allowed salary based on the byte-count of the other necessary Whitespace commands, which resulted in 11111111 (255).
T-SQL, $65,025 $72,614 (33 bytes)
PRINT CONCAT('$',CHECKSUM('
ßÝ')) -- $72614, 33 bytes
Just in case that doesn't display or copy correctly, the string is CHAR(10) + CHAR(223) + CHAR(221), so does not contain any multi-byte characters.
I've verified CHECKSUM produces this same result in both SQL 2017 and SQL 2012; it is unlikely but possible that other versions might produce different values (since the exact CHECKSUM mechanism is unpublished).
To find this I had to evaluate the CHECKSUM of all possible 3-character strings from CHAR(9) (tab) to CHAR(255). Good thing that's easy enough to do in SQL with a self-join from a number table.
Some of my prior attempts:
PRINT CONCAT('$',CHECKSUM(']èÆ')) -- $72562, 33 bytes
PRINT CONCAT('$',SQUARE(ASCII('ÿ'))) -- $65025, 36 bytes
PRINT CONCAT('$',PI()*EXP(PI()*PI())) -- $60738.6, 37 bytes
Note that any of these can alternately be written, with no loss of bytes, as:
PRINT FORMAT(CHECKSUM(']èÆ'),'C') -- $72,562.00 33 bytes
The latter has a more nicely formatted output, but it is unclear whether the comma is allowed by the rules.
Go, $84426
func f(){print("$",'')}
The character in the single quotes is the Unicode character with code point U+149CA, encoded as 4 bytes in UTF-8. The Unicode standard does not currently assign it a value, but it is nevertheless valid to place it in Go source code, earning me only 18 cents below the maximum for 27 bytes. If you prefer, the character U+14646 Anatolian Hieroglyph A530 is the nearest that is assigned, though it only gets me $83526.
Zsh, $127569, 15 bytes
];<<<\$$?${-%?}
Squeezing out a bit more than the Bash answer by abusing the default flags. By default, the $- parameter is set to 569X. ${ %?} removes the last character. We can actually get a lot further by manually controlling the flags:
zsh -178, $156789, 11 bytes
<<<\$${-%?}
If the exponent was slightly more favorable (-0.74 instead of -0.75), I could get quite the bonus: zsh +X5 -2378 '<<<\$$-' (7 bytes and $236789). Maybe management could be convinced next year...
Cascade, $177827, 10 bytes
^𫚣$
#"
I'm lucky here in that 𫚣 counts as a letter variable, which allows me to fetch its ordinal value, with the cost that it is a multi-byte character.
Runic Enchantments, 6 bytes, $255000
Thought I'd hit up a few challenges with the language I wrote a few days ago. 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).
'ÿY'$@
Explanation
> Implicit entry (single line programs only; does not occupy a cell)
'ÿ push ÿ as a character
Y multiply by 1000 (implicit conversion to 255)
'$ push $ as a character
@ print entire stack and terminate the IP
An earlier attempt was e|$$$':* (push 15, reflect, push 15, multiply, duplicate, push $, print, print, print, (print: empty stack: IP terminated), resulting in $196196 however I realized that I could use @ instead of $$ which got me f|@$':* with a score of $225225, but further experimentation showed that I could get down to six characters starting from Pbp'$@ (push PI, push 11, power, push $, print and terminate), which was c5p'$@. But that ran into the issue of no digit characters allowed (ironically, both entries resulted in higher outputs).
2 IPs (because the language can): $148642 (max $155100)
>e'$@
FFm\>
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
Keg, $298298 (5 Bytes)
\$Ī:
Fixed my answer now so it actually fits within the rules. Ī is two bytes so this is very close to the max I can get for this byte count.
How it works
\$ Pushes $ to the stack, has to be escaped since $ is the swap instruction in Keg
Ī Pushes the unicode value of this character, which is 298
: Duplicates the top value of the stack, which is 298
End of programme prints entire stack, resulting in $298298
33, $139,968 (12 bytes)
"$"jcaaaxxpo
Explanation
"$" p | Prints '$'
jca | Loads 36 (ASCII value of '$') into the accumulator and counter
aaxx | Trebles it (108), then multiplies the result by 1,296 (139,968)
o | Prints it
Ink, $56789, 43 bytes
$<>
-(o)~temp q=o+o+o+o
-(t){t+q}{t<=q:->t}
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}
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.
Perl 6, 18 bytes ($114431)
say '$'~ord ''
cQuents, $177800 (10 bytes)
@$#t:tto۲
Explanation
@$ prepend $
#t output tenth term in sequence
: each term in the sequence equals
tt 10 * 10 *
o۲ python ord("۲"), which is 1778
Canvas, $279936 (5 bytes)
$67^+
Note that the 6 & 7 there are full-width characters, not ASCII numbers.
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.
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
Aheui (esotope), 30 bytes, $73636
밦밦따빠맣빠뱘휉망어
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.
Z80Golf, $123456 (12 bytes)
00000000: 0606 3e24 ffc6 0c3c ff10 fc76 ..>$...<...v
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
K (oK), 13 bytes, $145794
"$",$*/"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 "$"
Lua, $74088 (32 bytes)
s='*'x=s:byte()print('$'..x*x*x)
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.
JavaScript, 31 bytes, $74088
(x='*'.charCodeAt())=>'$'+x*x*x
The * asterisk character decimal code point 42 cubed is 74088 Try it online!
Backhand, $189642 (9 bytes)
""o@$*O}
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.
Common Lisp, 59 bytes $46974
(defun x()(format nil "~{~a~}"(list'"$"(char-code #\띾))))
PowerShell 5.1, $77126 $85184 $101101 $105105, 25 21 20 Bytes
"$"+($x=+'i'[""])+$x
or
+'i'['']|%{"$ $_$_"}
or
$x=+'i'[''];"`$$x$x"
+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.
MathGolf, $353535 (4 bytes)
'$W∙
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.
Python 3, $78011 & 23 bytes
print("$",ord("𓂻"))
This is really simple, I just used the largest ordinal value I could find.
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.
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
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)
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
Stax, 6 bytes ($256256)
¥r○s╙$
Unpacked version:
VB$c'$L Full program
VB$ Push "256"
c Copy
'$ Push "$"
L Listify stack, producing ["$", "256", "256"]
Implicit flatten and output
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
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.
Ruby, $119443
$><<?$<<?.ord
The maximum integer output for 17 bytes. The Unicode character is U+1D293, which is 119443 in hex.
PHP, $122122 (17 bytes)
$<?=$a=ord(z),$a;
first attempt, $80662, 25 bytes:
$<?=(M_PI**M_PI)**M_PI<<!A;
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
FreeBASIC, $124095 (16 bytes)
?"$" &&hc &&hfff
prints
$124095
? means print
&h is the hex prefix
& connects parts together
Tested using FreeBASIC online
brainfuck, 34 bytes, $69999
+[->-[---<]>-]>.[-->+++<]>.+++....
Explanation:
+[->-[---<]>-]>. Generate and print 36 ($)
[-->+++<]> Divide by 2 and multiply by 3 to get 54 (6)
. Print 6
+++.... Print 9999
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.
brainfuck, 44 bytes, $57777
Omg, first time trying this thing.... I don't even know how I did it xD
+++++++++[>++++>+<<-]>.>[>++++++<-]>-.++....
GS2, 4 bytes ($256256)
•$▼▼
Just thought I'd add this as there were no 4 byte solutions. There are probably better solutions of 4 bytes, it'd be interesting to see what the highest is.
Explanation:
•$ Push a '$' character on the stack
▼ Push 256 on the stack
▼ Push 256 on the stack
Swift, $131072 (13 bytes)
"$\(MAXPHYS)"
In Swift Playground it prints "$131072"
Pepe, $74088 (30 bytes)
reeeEeeEeerEeeEeEeEerEeeEereEE
Explanation
reeeEeeEee # print $
rEeeEeEeEe # push 42 in stack r
rEeeEe # cube of 42 (74088)
reEE # output number
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
print"$", # Python 2's print statement doesn't need parentheses or whitespace
t**t>>t # 8 ** 8 = 16777216
# 16777216 >> 8 = 65536
MATLAB, 17 bytes, $112222
['$','..////'+pi]
Old answer:
['$','RRUUTR'-'!']
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!
C, $80010 (29 bytes)
o(){printf("$%d",'\aq'*'*');}
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...
Excel VBA - 22 Bytes, $97336
?"$"&Asc(".")^Asc("")
How it works
? - Print in immediate
"$" - $ character
asc(".") = 46
Asc("") = 3
46 ^ 3 = 97336
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...)
R, 21 bytes $99649.9
cat("$",min(lynx^pi))
A different R approach - see also Giuseppe's answer
Very close to the maximum of $101937 for this bytecount.
Bonus: object.size()
R, 24 bytes $89096
cat("$",object.size(ls))
This is probably system-dependent, but when I ra this on TIO I got $89096 - close to the limit of 92223 for 24 bytes.
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.
SmileBASIC, 10 bytes, $131072
?"$";#R*#L
#R and #L are constants with values of 512 and 256.
><>, 7 bytes, $232110
'onnè$
Explanation (simple):
'onnè$
' : Start putting chars onto the stack.
o : Print the stack top
nn : Print the stack top as numbers
è$ : Errors the program
PHP, $131116 (8 bytes)
Didn't see one for php and wanted to throw one up. I know someplace in php is a bad typecast that would cut this in half but I can't find it right now.
$<?=ERA;
This just takes advantage of PHP short tags and the PHP built in constants.
Cubix, $155088 (12 bytes)
*Ouo'ე'$/@
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
brainfuck, 43 bytes, $58888
++++++[>++++++<-]>.<++++[>++++<-]>+.+++....
How it works
++++++[>++++++<-]>. write 36 to cell one and print (36 is ASCII for $)
<++++[>++++<-]>+. add 17 to cell 1 and print (cell 1 is now 53, ASCII for 5)
+++.... add 3 to cell 1 and print 4 times (cell 1 is now 56, ASCII for 8)
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.
Common Lisp, $72447 (33 bytes)
(format t"$~d"(char-code #\))
The character is Unicode U+11AFF.
Pascal (FPC), $72089
33 bytes
begin write('$',$AFFFF div$A)end.
Found by playing with arithmetics and hexadecimal constants. See below for more interesting answers.
Pascal (FPC), $65526
37 bytes
var x:word=-$A;begin write('$',x)end.
Thanks to @JonathanAllan for reminding me of initialization in declaration, it shortened my new approach.
No way Brain-Flak programmer can have bigger salary!
$A is hexadecimal constant 10. Variables of type word have values in range 0..65535, so initializing it with -10 gives 65526 instead (and a range check warning).
Pascal (FPC), $54872
47 bytes
begin write('$',ord('&')*ord('&')*ord('&'))end.
PHP, 13 Bytes, $144000 Salary
Unfortunately for this job, moving to Mauritius is required (well, I could move slightly less far eastward, however every timezone less would yield at $36k drop in salary.) To compensate for the inconvenience, my salary increases by $1 every leap year.
$<?=date(ZL);
This just puts out Z the timezone in seconds and appends whether or not it's a leap year.
C#
Full program, 72 bytes, $40448 66 bytes, $43008
class P{static void Main()=>System.Console.Write("$"+('T'<<'i'));}
Explanation
Left-shift operator treats chars 'T' and 'i' as integers 84 and 105 respectively and performs shift
Lambda, 19 bytes, $109568 17 bytes, $118784
o=>"$"+('t'<<'j')
Edit Thanks to @LegionMammal978 and @Kevin for saving 2 bytes
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)
JavaScript (ES6), 19 bytes, $109,839
_=>atob`JDEwOTgzOQ`
\$109839\$ is the highest integer \$\le 109884\$ which does not produce any digit when prefixed with '$' and encoded in base64.
Without atob() (Node.js), 26 bytes, $86,126
_=>'$'+Buffer('V~').join``
The concatenation of '$' with the ASCII codes of 'V' (86) and '~' (126).
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.AAAAAAis 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).
Befunge-93, $154836 $164220 $165554, 12 11 bytes
".;=$",**.@
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.
Befunge-93, 9 bytes, $192448
a>$",**.@
Outputs $192448, just two dollars and nine cents short of the maximum. This even works as a polyglot with proper implementations of Befunge-98, where it doesn't even have to throw up an unrecognised instruction error!
Explanation:
a>$ Basically no-ops
" Wrapping string that pushes the code and a lot of spaces to the stack
, Print the $
** Multiply the byte values of a, > and a space
62*97*32 = 192448
.@ Print the number and terminate
Gol><>, $207680 in 8 bytes
'o**n; $
How it works:
' Start string interpretation. Pushes the ASCII value of every character until it wraps back around to this character
o Output the top stack value as ASCII. This is the $ at the end of the code
** Multiply the top 3 stack values (This is the ASCII of 'n; ', 110*59*32
n Output top of stack as integer.
; Terminate program
$ (Not run, used for printing the $)
Interestingly enough, you can use h instead of n;, which yields 'o**h5$ with a score of $231504, but you can't use 0-9, and there isn't another 1-byte way to push 53, the ASCII value of 5
><>, 8 bytes, $210196
'o+n+|V$
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
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)
K (oK), $130,331.00 of a maximum of $131,199.00 (15 bytes)
"$",$*/`i$"//;"
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
Excel 19 bytes $107899.616068361
="$"&CODE("(")^PI()
Explanation:
CODE("(") // find ASCII code of ( which is 40
^PI() // raise to power of Pi (40^3.141592654)
"$"& // append $ to the front of it
= // set it to the cell value and display
Perl 6, 11 bytes, $165,000 10 bytes, $177,147 12 bytes, $150,000
'$'~㉝*ↁ
'$'~۳¹¹
{'$'~۳*ↇ}
The Unicode characters ㉝ (CIRCLED NUMBER THIRTY THREE) and ↁ (ROMAN NUMERAL FIVE THOUSAND) conveniently evaluate to their Unicode values in numeric expressions.
۳ is the Unicode character EXTENDED ARABIC-INDIC DIGIT THREE, which conveniently evaluates to its Unicode value of 3 in numeric expressions. That 3 is raised to the eleventh power by following it with two superscript ones.
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
CJam, (5 bytes) $294204.018...
'$PB#
Explanation:
I derived it from Dennis' answer, but looked for combinations of numbers which would yield a higher result. I almost gave up, but I saw that P is the variable for \$\pi\$, and that \$\pi^{11} \approx 294000\$. The letter B has a value of 11 in CJam, giving the code above.
R, 20 bytes, $103540.9
T=pi+pi;cat("$",T^T)
The max for 20 bytes is $105737.1, so this is quite close to the salary cap!
This would be a nice raise, and if I get paid to do code golf......
Befunge-98 (PyFunge), 8 bytes, $209728
$",**.q:
The character : has been computed using the following method:
>>> chr(int((1_000_000 * 8 ** -0.75) / (ord(' ') * ord('q'))))
':'
Using @ and f also works but gives only $208896.
Flobnar, 16 bytes, $123904
$,g<+<>!
@X:+<*\
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))
JavaScript (Node.js), 23 bytes, $65535
_=>"$"+ +(~~[]+`xFFFF`)
This is the best I can get without atob, though there is a large improvement space tbh
You know, having no short character to ascii conversion function sucks A LOT.
AFTER A WHOLE DAY
JavaScript (Node.js), 30 bytes, $78011
_=>"$"+`𓂻`.codePointAt(![])
or: 29 bytes, $80020
_=>"$"+``.codePointAt(!_)
Where is U+13894 INVALID CHARACTER
Oh String.codePointAt! I've just completely forgotten this!
A joke one (15B, $130000), not vaild at all but just for fun
_=>"$十三萬"
Perl 5.26.2, 12 bytes, $146002
say$]^"\x11\x0e\x01\x06"
Hex escapes only shown because ASCII control chars are filtered out.
You can get a bit more with different Perl versions, for example $155012 with 5.25.12.
Jelly, $256000 $256256 (6 bytes) $257256
⁹‘”$;;
A full program. (Maximum achievable salary @ 6 bytes is $260847.43)
How?
⁹‘”$;; - Main Link: no arguments
⁹ - Literal 256 256
‘ - increment 257
”$ - single '$' character '$'
; - concatenate ['$',257]
; - concatenate ['$',257,256]
- implicit print -> $257256
Previous...
5 bytes $256256
”$;⁹⁺
('$' concatenate 256, repeat 256 - causing interim implicit printing)
6 bytes $256000:
⁹×ȷṭ”$
(256 × 1000 ṭack '$')
05AB1E (5 bytes), $262626
'$₂ÐJ
\$262626 < 299069\$. Pushes the character $ to the stack, then pushes the integer \$26\$. From here, the program triplicates the integer, leaving the stack as ["$", 26, 26, 26] and joins (J) the stack.
><>, 8 bytes ($196196)
code:
e|noi:*
input:
$
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
Japt, 5 bytes, $262144
'$+I³
Explanation
I is the Japt constant for 64, ³ cubes it and then '$+ concatenates that with the dollar symbol.
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'*'Α');
Charcoal, 6 bytes, $252525
$׳I²⁵
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:
$×⁶I²
Try it online! Link is to verbose version of code.
bash, $127127
x;echo \$$?$?
Since the x command doesn't exist, it errors and sets the exit code to 127.
Then, the code outputs a dollar sign followed by $? twice. The $? variable stores the exit code of the previous command, so this outputs $127127 in 13 bytes.
vim, $99999 $110000 $120000
i$=&pvh*&ur
Uses the expression register (note that there is a <C-r> character, which is invisible in most fonts, between the $ and =, for a total of 13 bytes) to insert the value of the 'pvh' option times the value of the 'ur' option.
'previewheight' is the option that controls the height of preview windows, which is 12 by default.
'undoreload' is the maximum number of lines a buffer can have before vim gives up on storing it in memory for undo, and it defaults to 10,000.
GS2, (5 bytes) $292,929
•$☺↔A
A full program (shown here using code-page 437). (Maximum achievable salary @ 5 bytes is $299069.75)
Builds upon Dennis's GS2 answer...
•$☺↔A []
•$ - push '$' ['$']
☺ - push unsigned byte:
↔ - 0x1d = 29 ['$',29]
A - push top of stack twice ['$',29,29,29]
- implicit print $292929
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 :)
Python 3, (22 bytes) $ 98,442
print('$',ord('𘂊'))
Much like Doorknob's Ruby answer, the 4 byte Unicode character used here, 𘂊, has an ordinal value of the maximal integer salary achievable in 22 bytes.
Note that print() prints its unnamed arguments separated by spaces by default (sep is an optional named argument).
Jelly, 5 bytes, $256'256
”$¹⁹⁹
How it works
”$¹⁹⁹ Main link. No arguments.
”$ Set the left argument and the return value to '$'.
¹ Apply the identity function. This allows implicit printing.
⁹ Set the return value to 256.
Since this discards the previous return value ('$'), it is printed implicitly.
⁹ Set the return value to 256.
Since this discards the previous return value (256), it is printed implicitly.
(implicit) Print the last return value (256).
Brain-Flak, $55555
([(((()()()()){}){}())](((((({})({}()){}))))))
Brain-Flak with -r flag, $57777
((((((((()()()()){}){}())(({}()){}))()()))))
GS2, 5 bytes, $291'000
•$☺↔∟
This is a CP437 representation of the binary source code.
How it works
•$ Push '$'.
☺↔ Push 29.
∟ Push 1000.
CJam, 5 bytes, $262'144
'$YI#
How it works
'$ Push '$'.
Y Push 2.
I Push 18.
# Pop 2 and 18 and perform exponentiation, pushing 262144.
