269
\$\begingroup\$

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:

enter image description here

\$\endgroup\$
9
  • 76
    \$\begingroup\$ This is one of the very few (imo) successful non-fixed-output no-input non-random challenge. Unique idea! \$\endgroup\$
    – Mr. Xcoder
    Aug 26, 2018 at 0:45
  • 4
    \$\begingroup\$ 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. \$\endgroup\$
    – BradC
    Aug 27, 2018 at 19:07
  • 7
    \$\begingroup\$ 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! \$\endgroup\$ Aug 27, 2018 at 19:27
  • 12
    \$\begingroup\$ 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 ;) \$\endgroup\$ Aug 28, 2018 at 11:21
  • 4
    \$\begingroup\$ 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. \$\endgroup\$ Feb 8, 2019 at 8:22

145 Answers 145

1
\$\begingroup\$

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
\$\endgroup\$
1
\$\begingroup\$

GS2, 4 bytes ($256256)

•$▼▼

Try it online!

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
\$\endgroup\$
2
  • \$\begingroup\$ Does GS2 use its own encoding table? If not doesn't seem like a single byte but 4, so the length of your code would be 10 bytes. Please correct me if I'm wrong. \$\endgroup\$
    – Skillmon
    Aug 31, 2018 at 22:27
  • \$\begingroup\$ @Skillmon this is actually the first program I've written in GS2. From the other answers, it seems like tio.run uses code page 437 (which is linked in other answers). From there I checked the docs to find the appropriate bytes and got this. \$\endgroup\$
    – maxb
    Sep 1, 2018 at 7:23
1
\$\begingroup\$

SQLite, 26 bytes, $86850

select'$'||unicode('𕍂')

Try it online!

Inspired by T-SQL @BradC answer

\$\endgroup\$
1
\$\begingroup\$

FreeBASIC, $124095 (16 bytes)

?"$" &&hc &&hfff

prints

$124095

? means print

&h is the hex prefix

& connects parts together

Tested using FreeBASIC online

\$\endgroup\$
1
\$\begingroup\$

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

." $"char 𞡈 .

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ +1 I feel silly for only now realizing that you don't need a space after the closing " to a ." word \$\endgroup\$
    – reffu
    Aug 27, 2018 at 16:46
1
\$\begingroup\$

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

\$\endgroup\$
6
  • \$\begingroup\$ 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. \$\endgroup\$ Aug 31, 2018 at 11:18
  • \$\begingroup\$ Indeed, but the rules state that I cannot use numbers :) \$\endgroup\$
    – Moacir
    Aug 31, 2018 at 11:21
  • 2
    \$\begingroup\$ 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 \$\endgroup\$ Aug 31, 2018 at 11:22
  • \$\begingroup\$ 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. \$\endgroup\$ Sep 3, 2018 at 17:47
  • \$\begingroup\$ 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)? \$\endgroup\$
    – Moacir
    Sep 3, 2018 at 17:58
1
\$\begingroup\$

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
\$\endgroup\$
1
\$\begingroup\$

Common Lisp, 59 bytes $46974

(defun x()(format nil "~{~a~}"(list'"$"(char-code #\띾))))

Try it online!

\$\endgroup\$
1
\$\begingroup\$

JavaScript, 31 bytes, $74088

(x='*'.charCodeAt())=>'$'+x*x*x

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

\$\endgroup\$
1
\$\begingroup\$

C (clang), $70560 (34 bytes)

main(){printf("$%d",'*'*'*'*'(');}

Try it online!

\$\endgroup\$
1
\$\begingroup\$

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!

\$\endgroup\$
0
1
\$\begingroup\$

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
\$\endgroup\$
1
  • \$\begingroup\$ Nice work. You should put the resulting salary in your header as well, so we can see that at a glance. \$\endgroup\$
    – BradC
    Dec 3, 2018 at 14:32
1
\$\begingroup\$

Canvas, $279936 (5 bytes)

$67^+

Try it here!

Note that the 6 & 7 there are full-width characters, not ASCII numbers.

\$\endgroup\$
1
\$\begingroup\$

Ink, $56789, 43 bytes

$<>
-(o)~temp q=o+o+o+o
-(t){t+q}{t<=q:->t}

Try it online!

Explained

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

Alternative solution: $66666, 31 bytes, but

I did find a better solution, but I don't like it, because it abuses a bug in the interpreter:

-(n){|}$<>
-(t){t<n+n:{n+n}->t}

Try it online!

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

\$\endgroup\$
1
\$\begingroup\$

Befunge-93 (FBBI), $209024 (8 bytes)

",**.@G$

Try it online!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Note that this beats the previous Befunge-93 answer because this interpreter doesn't follow spec on pushing a space when wrapping \$\endgroup\$
    – Jo King
    Jun 29, 2019 at 1:57
1
\$\begingroup\$

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'$@

Try it online!

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\>

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
\$\endgroup\$
3
  • 1
    \$\begingroup\$ If I'm reading the challenge correctly, 7 bytes only allows for a maximum of $232368 \$\endgroup\$
    – recursive
    Oct 3, 2018 at 23:38
  • \$\begingroup\$ @recursive Program is only 6 bytes, the header is typo'd. \$\endgroup\$ Oct 3, 2018 at 23:48
  • \$\begingroup\$ ÿ is a two byte character, so this is 7 bytes \$\endgroup\$
    – Jo King
    Mar 22, 2019 at 5:33
1
\$\begingroup\$

Cascade, $177827, 10 bytes

^𫚣$
 #"

Try it online!

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.

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

Wren, 34 bytes, $71021

Wren's verbosity ruined the game.

System.printAll(["$"]+"
".bytes)

Try it online!

\$\endgroup\$
1
\$\begingroup\$

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

\$\endgroup\$
1
\$\begingroup\$

Deadfish~, $101111 (21 bytes)

iisiisc{{d}}iiisioioo

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Knight, $126126 (13 bytes) $127127 (15 bytes)

O++"$"=d+A"~"Td

Try it online!

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
\$\endgroup\$
1
\$\begingroup\$

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*LXXX should'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"
)
\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

Vyxal , 6 bytes, $260847

\$»⟑¬ǎ

Try it Online!

\$\endgroup\$
1
\$\begingroup\$

Zsh, $138166 (14 bytes)

<<<\$$[##𡮶]

Attempt This Online!

𡮶 is the Unicode character with codepoint 138166. This is the maximum integer score for 14 bytes.

\$\endgroup\$
1
\$\begingroup\$

Rattle, $ 180180 (9 bytes)

$|bn*~/bb

Try it Online!

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")
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Thanks for your answer! Unfortunately the "0" character is not allowed in the source code... \$\endgroup\$
    – Nicola Sap
    Jul 19, 2021 at 14:56
  • 1
    \$\begingroup\$ @NicolaSap thanks for pointing that out! That slipped my mind when I posted my answer - I've updated it so the 0 is replaced with ~, which does the same thing in this case \$\endgroup\$
    – Daniel H.
    Jul 19, 2021 at 15:26
1
\$\begingroup\$

Trilangle, $177827 (10 bytes)

"$𫚣o!@"

That CJK character is U+2B6A3, and 0x2b6a3 is 177827 in decimal.

Try it on the online interpreter!

\$\endgroup\$
1
\$\begingroup\$

Pyth, $192169 (9 bytes)

s+\$CM"À©

Try it online!

\$\endgroup\$
1
\$\begingroup\$

Julia 1.0, $101937 (23 21 bytes)

print(:$,Int('𘸱'))

Try it online!

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 '/$'

\$\endgroup\$
1
  • 1
    \$\begingroup\$ 21 print(:$,Int('𗏮')) \$\endgroup\$
    – amelies
    Apr 2, 2023 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.