| Bytes | Lang | Time | Link |
|---|---|---|---|
| 010 | ARBLE | 250123T222600Z | ATaco |
| nan | Lua | 250123T221835Z | ATaco |
| nan | Perl 5 M5.010 | 250123T051452Z | andytech |
| nan | Tcl | 250121T123522Z | sergiol |
| nan | Zsh | 250121T073038Z | roblogic |
| 017 | Bash | 250121T004406Z | roblogic |
| nan | Bespoke | 250120T192735Z | Josiah W |
| 2010 | Kona | 250120T142503Z | Abstract |
| nan | ><> | 220209T123826Z | sinvec |
| 024 | MAWP | 200816T074633Z | Razetime |
| 046 | naz | 200126T072459Z | sporebal |
| 033 | Intcode | 191224T040227Z | The Fift |
| 7235 | W j | 191223T053846Z | user8505 |
| 8504 | Keg | 191219T065811Z | lyxal |
| nan | VBA Excel | 190301T043359Z | remoel |
| 012 | Gol><> | 190228T193511Z | KrystosT |
| nan | C# .NET Core | 190102T223452Z | Destroig |
| 055 | brainfuck | 190226T014426Z | Cortex |
| nan | Runic Enchantments | 190224T221057Z | Draco18s |
| nan | PowerShell | 190124T225038Z | Veskah |
| nan | MASM 8088 Assembly source | 190102T190545Z | 640KB |
| nan | Befunge98 FBBI | 190103T095138Z | Wisław |
| nan | Perl 5 | 190103T000616Z | Xcali |
| nan | SmileBASIC | 190102T212001Z | 12Me21 |
| 9245 | Japt | 181105T104125Z | Shaggy |
| nan | Aheui esotope | 181127T044732Z | cobaltp |
| 010 | Powershell | 181127T191155Z | mazzy |
| 185 | Python 3 | 181108T184009Z | glietz |
| nan | Lua | 181127T173042Z | ouflak |
| nan | 181127T170007Z | CodeGolf | |
| nan | MathGolf | 181127T093115Z | maxb |
| 003 | Pyke | 181110T003100Z | Blue |
| 010 | 7 | 181108T212537Z | ais523 |
| nan | F# | 181106T142553Z | dumetrul |
| nan | R | 181106T122410Z | JDL |
| nan | Java 8 | 181105T095230Z | Kevin Cr |
| nan | Whitespace | 181105T150313Z | Kevin Cr |
| 025 | Python 3 | 181105T070924Z | tsh |
| nan | Python 2 | 181106T032006Z | Chas Bro |
| nan | Perl 6 | 181105T232435Z | Jo King |
| nan | TSQL | 181105T230915Z | BradC |
| 6834 | Wolfram Language Mathematica | 181105T230757Z | Misha La |
| nan | JavaScript ES6 | 181105T224323Z | Rick Hit |
| nan | JavaScript ES7 | 181105T101407Z | Arnauld |
| nan | Z80Golf | 181105T150635Z | user3604 |
| 025 | Neim | 181105T151925Z | Okx |
| 1829 | APLDyalog Unicode | 181105T134450Z | Quintec |
| nan | JavaScript SpiderMonkey | 181105T061240Z | guest271 |
| nan | Red | 181105T133345Z | Galen Iv |
| nan | perl M5.010 Mre=eval | 181105T133712Z | user7392 |
| 7235 | 05AB1E | 181105T091546Z | Kevin Cr |
| nan | Lost | 181105T013841Z | Jo King |
| nan | 05AB1E | 181105T072321Z | Emigna |
| nan | PHP | 181105T062222Z | Titus |
| 016 | Python 2 | 181105T054717Z | Vedant K |
| nan | BrainFlak | 181105T052044Z | DJMcMayh |
| 143 | JavaScript | 181105T020224Z | guest271 |
| nan | Charcoal | 181105T015202Z | Neil |
| 7235 | Jelly | 181105T013910Z | Dennis |
ARBLE, 10 bytes
4815162342
Polyglot with a bunch of languages that allow constant-only answers.
ARBLE, 23 bytes / 2 = 11.5 points
gsub("*",".",byte)
Slightly more interesting, but worse scoring solution.
Perl 5 -M5.010, 31 bytes - 50% = 15.5
Wanted a solution containing no digits...
say-ord(A)+ord for EIPQXk=~/./g
Bespoke, 69 bytes / 2 = 34.5 points
THE TELEVISION SHOW SYNOPSIS
I think I should go get Lost
or should I
(I've never seen the show.)
Explanation: Bespoke works by converting a program's word lengths to digits, and then to instructions. In this case, only two instructions are needed: one that pushes 4815162342 onto the stack, and one that outputs that number.
Below is a "mnemonic" representation of the two necessary instructions. Note that defining the number to push requires words of lengths 4, 8, 1, 5, 1, etc.
PUT XXXXXXXXXX:FOUR INTEIGHT I FIFTH I SEXTET BI TRI FOUR BI
OUTPUT N
So perhaps something like the following is the true meaning of these numbers? (Again, I wouldn't know; I've never seen the show.)
LOST SYNOPSIS:
"I think I should go get...Lost." (No!)
><>, 29/2 = 14.5 bytes
','a+'a''a'*a+:f+f+f+f+c-**n;
Forms on the stack 3 numbers 54 9419 9467, multiplies them and outputs 4815162342.
naz, 46 bytes, score 32.2
2a2a1o2m1o7s1o5m1o2s2s1o6m1o2s2s1o1a1o1a1o2s1o
Simply outputs each digit in 4815162342 one at a time.
Intcode, 33 bytes
4,0,104,8,104,16,104,23,104,42,99
Basic hardcoded answer (104 means "output the number after this in the sequence"). Getting the bonus would be very hard (although probably possible), given that 4 is the output instruction ...
W j, 7 / 2 = 3.5 points
I updated the ord to support W's own code page.
0“„√*"C
Explanation
0“„√*" % Define a string
C % Convert to codepoints [48,15,16,23,42]
Flag:j % Join the output list without a separator
```
Keg, 8 - 50% = 4 bytes
밗..
Answer History
10 - 50% = 5 bytes
🄅🄉🄂🄆🄂🄇🄃🄄🄅🄃
Literally just prints the number 4815162342 using the push'n'print method.
VBA (Excel), 38 66 bytes - 50% = 33 points
Using Immediate Window
?Join(Split("4 8 1 5 1 6 2 3 4 2"),"")
a=" ":For Each x in Split(a):b=b &Asc(x):Next:?b
Gol><>, 12 bytes, score 6
"*"lRn;
Pretty simple, I just used whitespace to encode and outputted it in order, I believe the score is correct, since it said to set it to 50% if you don't use any numbers, and this only has ascii characters!
C# (.NET Core), 17 bytes *.7 = 11.9 bytes.
Ascii-Only's version.
()=>0x5FAB2EA2l*3
C# (.NET Core), 42 bytes, score = 42/2 = 21
Uses the F386 and BC17 characters.
()=>{return $"{(int)'밗'}{(int)''}";};
Runic Enchantments, 15/2 = 7.5
\>`*`
Rn$!;
Simply encodes the values in as few bytes as possible. 42, 16, 15, 8, and 4, coerces them to numerical values, and prints them in reverse order. 4 8 15 16 42 without any spaces, as 48151642 was an acceptable output format.
4 and 8 could not be combined (48) as that is a numerical 0 and was not allowed to be used. It is possible to combine the 15, 16, and 42 into 2 characters (instead of 3) ʂ at the expense of +1 byte, which wasn't worth it.
PowerShell, 12 bytes * 0.7 = 8.4
0x5FAB2EA2*3
"Port" of Xcali's answer to have a better Powershell answer.
MASM 8088 Assembly source, (93 bytes - 50%) = 46.5 bytes
Using no numbers or the sequence in the source:
MOV AH,'P'-'G'
LEA DX,L
INT '!'
RET
T EQU '-'-'+'
L DW 'ph'/T,'jb'/T,'lb'/T,'fd'/T,'dh'/T,'$'
Output:
A>LOST.COM
4815162342
Befunge-98 (FBBI), 15 bytes / 2 = 7.5 points
"*H/!k-"*.*+..@
Explanation:
First push the ASCII values of the characters '*+H/!k- (42, 72, 47, 33, 107, 45) in this order to the stack. Then compute \$4815 = 45 \cdot 107\$ and \$1623 = 33\cdot 47+72\$, and output.
SmileBASIC, 13 - 30% = 9.1 bytes
?&h1CB35ACA;2
Uses a hexadecimal number to avoid any of the numbers in the sequence. The final 2 needs to be printed separately because 4815162342 doesn't fit into a 32 bit signed integer.
Aheui (esotope), 45 bytes(15 chars) * 0.5 = 22.5 points
반밤밪박밭빠따받발따밣뱣히망어
Explanation:
See this also; Aheui Reference(English)
Aheui program starts with default stack '아'(or none)
반: push 2, move cursor right by 1(→).
밤: push 4, →
밪: push 3, →
박: push 2, →
밭: push 4, →
빠: dup, →
따: pop 2, push mul result(16).
받: push 3, →
발: push 5, →
따: pop 2, push mul result(15).
밣: push 8, →
뱣: push 4, move cursor right by 2(→→).
히: end.
망: pop 1, print, → (if stack is empty, move cursor left by 1.)
어: move cursor left by 1(←).
Note that ㅁ(print instruction) moves cursor by reverse direction if stack(or queue) is empty.
Powershell, 10 bytes, score 10
4815162342
Python 3, 44 38 19 18.5 bytes
-6 bytes thanks to @Jo King
-50% bytes thanks to @ouflak for pointing out the 50% bonus
-1 byte thanks to @Dennis
for i in'밗ɯ*':print(ord(i),end='')
Lua, 69 bytes / 2 = 34.5 points
a={"","","","","","*"}s=" "for i=#s,#a do print(s.byte(a[i]))end
Python 3 34 Points
b=len(" ");c=b*b;d=c*b;e=d*b;g=e+d-b//b;print(c,d,e-b//b,e,g,g*b-c)
MathGolf, 7 bytes * 0.5 = 3.5
ÿ≤┼ÇÅ$∞
Explanation
Note that this code doesn't yet work on TIO. I have made some changes to MathGolf recently, including adding the $ operator. Once it gets pulled to TIO you can run it there, I'll make an update to this answer then. It runs perfectly in the terminal
ÿ≤┼ÇÅ Push "≤┼ÇÅ"
$ pop(a), push ord(a) (pushes 2407581171)
∞ pop a, push 2*a
I utilize the fact that MathGolf has 1-byte literals for creating strings of up to length 4. If I wanted to convert the entire number from a base-256 string, I would have needed to use two ", and the string would have been 5 characters. This way, I save 2 bytes, but I lose one byte by having the doubling operator in the end.
Pyke, 3 points
77 91 f8 86 98 06
The first byte signals to read in base 128 until a byte without the high bit is set.
Finally, 32 is subtracted from the result (for historical reasons).
This allows for the generation of large numbers in very small amounts of space
7, 10 bytes, 27 characters
115160723426754314105574033
The packed representation of this program on disk is (xxd format):
00000000: 269c 3a71 6f63 308b 7c0d &.:qoc0.|.
Explanation
We've seen this sequence of numbers before, in Automate Saving the World, which was about printing the numbers at regular intervals, making it interesting via requiring the use of a very old language. Much newer languages can have their own twists that make this challenge interesting, though. (Yes, this paragraph, and in fact the reason I started writing this answer, is effectively just a way to get all the related challenges to show up together in the sidebar; normally people do that using comments but I don't have enough rep.)
The first thing to note is that 7 is made entirely of digits, so going for the bonuses here is unlikely to work (although if you view the program as a sequence of octets, none of them correspond to ASCII representations of any of the original numbers, so you could claim the bonus in that sense). The next thing to note is that 7 has commands to recreate the command sequence likely to have produced a specific piece of data; so could we possibly interpret the Lost numbers 4815162342 as a section of a 7 program itself?
The answer is "not quite". The most problematic part is that second number, 8. 7 programs are written in octal; there's no such number as 8. So the very start of the string will have to be printed differently.
The base of the program is therefore based on the 7 "Hello world" program:
5431410557403
543141055 string literal
7 separate data from code
4 rearrange stack: {program's source}, empty element, {literal}
0 escape {the literal}, appending it to {the empty element}
3 output {the escaped literal}, pop {the program's source}
with the escaped literal being in a domain-specific language that's interpreted as follows:
5 output format: US-TTY using pairs of digits in the string
43 select character set: digits and common symbols
14 "4"
10 "8"
55 forget the set output format
After this comes an extra 3, which outputs the remaining stack element (and exits due to insufficient remaining stack). That element is specified at the start of the program, and to avoid the unmatched 6 (which works a bit like a closing bracket), we generate it using code, rather than writing it directly as data. (Note that there are two implied 7 characters at the start of the program, which is relevant here):
{77}115160723426
7 empty stack element
7 11516 append "1151"
0 append "6"
723246 append "2324"
That produces the following literal:
115162324
1 set output format: literally as octal
15162324 "15162324"
which gets printed out.
F#, 45 bytes = 22.5 points
Just a run-of-the-mill for loop that prints the digits:
for c in"DHOPWj"do printf"%d"(int c-int '@')
The above is a complete program that can be compiled into an executable.
In a REPL (read-eval-print loop), e.g. FSI (F# Interactive), the following shorter version will work, as the REPL will output a representation of the expression evaluated; it has 35 bytes = 17.5 points:
[for c in"DHOPWj"->int c-int '@'];;
R, 18x0.7 = 12.6 score
cat(9*2*267509019)
Fairly self explanatory, just does some arithmetic avoiding the numbers in question.
Java 8, score: 12 11.9 (70% of 17 bytes)
v->767*6277917L+3
-0.1 score thanks to @RickHitchcock.
Explanation:
v-> // Method with empty unused parameter and long return-type
767 // 767
*6277917L // multiplied by 6277917 (as long)
+3 // And then 3 is added
Old answer with a score of: 12 (50% of 24 bytes):
v->(long)''*'Ⓥ'*'䧶'
Contains an unprintable character 0x1B.
Explanation:
v-> // Method with empty unused parameter and long return-type
(long) // Cast the character (and therefore the result) to a long
'' // 27
*'Ⓥ' // Multiplied by 9419
*'䧶' // Multiplied by 18934
In Java, characters can be autoboxed to integers holding their unicode value. Unfortunately, the maximum supported unicode for characters is 65,535, so I can't use just two characters to multiply (since the largest two numbers that divide the expected 4,815,162,342 are 56,802 and 84,771, where the 84,771 unfortunately exceeds the maximum 65,535.
In addition, since the maximum size of an int is 322-1 (2,147,483,647) and the result 4,815,162,342 is larger than that, an explicit cast to long, which can hold up to 642-1 (9,223,372,036,854,775,807), is required.
Boring answer would have been 14 bytes without any bonuses:
v->4815162341L
Whitespace, score: 49 41 bytes / 2 = 20.5
[S S S T S S S T T T T T S S S S S S S T T S S S T S T T T T T S S T T S N
_Push_4815162342][T N
S T _Print_number]
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).
Pseudo-code:
Integer i = 4815162342
Print i as number to STDOUT
Explanation:
In whitespace, a number is pushed as follows:
S: Enable Stack ManipulationS: Push numberS/T: Positive/negative respectively- Some
T/Sfollowed by a singleN: Decimal as binary, whereTis 1 andSis 0
After that it is simply printed with TNST:
TN: Enable I/OS: Output the top of the stackT: As number
Python 3, 25 bytes, 12.5 points
print(*map(ord,'ዏٗ*'))
𩦦(髒, ⿰馬葬), 𧨦(謚, ⿰言⿱⿵八一皿) cost 4 bytes, but U+0657 only cost 2 bytes...
Python 3, 29 bytes, 14.5 points
print(ord('𩦦')*ord('湡'))
𩦦 (⿰馬葬) is variant character of 髒 which means "dirty". 湡 is the name of a river. And they are nothing related to this question as I known.
Python 2, 38 * 0.5 = 19 score 34 bytes * 0.5 = 17 score
print map(`int`.find,"ent t'ypey")
Outputs a list of the digits in the sequence; i.e. the list [4, 8, 1, 5, 1, 6, 2, 3, 4, 2].
Because it's more interesting to satisfy the 'no digits' approach, regardless of the score.
Python 2, 23 bytes - 30% = 16.1 score
print int('27mtn1i',36)
Perl 6, 17 bytes * 0.5 = 8.5
say ords "*"
This gets the ordinal values of a lot of unprintables and gets the no digits bonus. Using the no numbers from the sequence bonus, we can get 16 * 0.7 = 11.2 points:
say 0x5FAB2EA2*3
Which in turn beats the plain solution of 14 bytes:
say 4815162342
T-SQL, 20 bytes - 30% bonus = 14
PRINT 2.*9*267509019
Contains none of the sequence directly. Factored via this web site. The period is in there as an implicit conversion to float so we don't overflow an INT.
This is just slightly better that the trivial solution (16 bytes, no bonus):
PRINT 4815162342
Wolfram Language (Mathematica), 68 bytes (score 34)
#&@@@"distinctive pattern nothing is known about"~StringPosition~"t"
Prints the list {4,8,15,16,23,42}.
JavaScript (ES6), 16 * 0.7 = 11.2 bytes
_=>767*6277917+3
Outputs the digits with no delimiters.
JavaScript (ES7), 34/2 = 17 bytes
_=>eval(atob`NjUwNTgxMDErNDEqKjY`)
This decodes and evaluates the expression "65058101+41**6", which does not contain any digit once encoded in base-64.
$$65058101+41^6=65058101+4750104241=4815162342$$
JavaScript (ES6), 13 bytes
Boring obvious solution.
_=>4815162342
Z80Golf, 17 bytes * 0.5 = 8.5
00000000: 1b17 1e1a 1e19 1d1c 1b1d 2676 0a03 c5ee ..........&v....
00000010: 2f /
Assembly:
db 0x2F ^ '4' ;1b dec de
db 0x2F ^ '8' ;17 rla
db 0x2F ^ '1' ;1e ld e,
db 0x2F ^ '5' ;1a 0x1a
db 0x2F ^ '1' ;1e ld e,
db 0x2F ^ '6' ;19 0x19
db 0x2F ^ '2' ;1d dec e
db 0x2F ^ '3' ;1c inc e
db 0x2F ^ '4' ;1b dec de
db 0x2F ^ '2' ;1d dec e
ld h, 0x76 ;halt
ld a, (bc) ;load the next digit. The first char in addr in 0x0
inc bc ;get next digit
push bc ;return to the next digit which is basically a nop
xor 0x2F ;decode the digit
;fall through into putchar. Putchar (0x8000), prints the char in register a
Neim, 6 5 bytes, 3 2.5 points
Jσς§A
Explanation:
J Push 48
σ Push 15
ς Push 16
§ Push 23
A Push 42
Implicitly join the contents
of the stack together and print
APL(Dyalog Unicode), 18/2 = 9 bytes
×/⎕UCS'𩦦湡'
Just boring old character multiplication.
JavaScript (SpiderMonkey), 67 bytes / 2 = 33.5 60 bytes / 2 = 30 58 bytes / 2 = 29 48 bytes / 2 = 24
-7 bytes/3.5, -2 bytes/1 courtesy of @JoKing, -10 bytes/5 courtesy of @tsh
print(a=-~-~-~-~[],a+=a,b=a+~-a,a+a,a+b,--b+b+b)
Red, 50 bytes / 2 = 25
foreach c"abcdcefgaf"[prin index? find"cfgade.b"c]
Prints the numbers without separator
perl -M5.010 -Mre=eval, 32/2 == 16 bytes
This program is mostly unprintable characters -- characters which aren't even Unicode characters. Here is a hexdump of the program:
$ od -x solution
0000000 2727 7e3d 277e c0d7 8c84 869e cbd8 c7d3
0000020 ced3 d3ca c9ce cdd3 d3cc cdcb 82d8 27d6
0000040
$
And here's the program to create the solution:
#!/opt/perl/bin/perl
use 5.026;
use strict;
use warnings;
no warnings 'syntax';
use experimental 'signatures';
my $q = ~"(?{say'4,8,15,16,23,42'})";
print "''=~~'$q'";
__END__
05AB1E, score: 10 9 7 bytes / 2 = 3.5
•‘o]Ê•·
Or 7 bytes alternative:
•’µ[%•R
Both outputting the integer 4815162342.
Explanation:
•‘o]Ê• # Compressed integer 2407581171
· # Doubled
•’µ[%• # Compressed integer 2432615184
R # Reversed
See this 05AB1E tip of mine (section How to compress large integers?) to understand why •‘o]Ê• is 2407581171 and •’µ[%• is 2432615184.
Old 9 bytes answer outputting the list [4,8,15,16,23,42]:
•ΓƒÇ²•т;в
-1 byte (and therefore -0.5 score) thanks to @Emigna.
Longer than the other 05AB1E answer, but this outputs the list [4,8,15,16,23,42] instead of the integer 4815162342.
Explanation:
•ΓƒÇ²• # Compressed integer 1301916192
т; # Integer 50 (100 halved)
в # Convert the first integer to Base-50 (arbitrary): [4,8,15,16,23,42]
See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer-lists?) to understand why •ΓƒÇ²• is 1301916192, and •ΓƒÇ²•50в is [4,8,15,16,23,42].
Lost, 29 27/2 = 13.5 bytes
%?\>>>>>>>>>>
>>\"*"@"
Try it online! or verify that it is deterministic
Seemed like the right language to use.
Explanation:
Lost is a 2D language where the pointer starts anywhere, going in any direction. This generally leads to a lot of double checking that the pointer hasn't entered a section early.
...>>>>>>>>>> These arrows filter all pointers that appear on the top line
............. Or going vertically
%............ This flips the flag so that the program can end
............. This stops premature termination
.?\.......... Clear the stack by skipping if a value popped from the stack is positive
............. When the stack is empty, the \ directs the pointer down
............. The \ directs the pointer right
..\"*".. The string literal pushes all the Lost values to the stack
..\.......... The @ terminates the program if the % flag is switched
>>\........@. Otherwise it clears the stack and repeats
............. The quote here is to prevent the pointer getting stuck
............" This happens when the pointer starts between the other quotes
PHP, 35/2=17.5
<?=zzzzzzzzzzzzzzz^NVBVKOVKLVHIVNH;
a digital approach: 40*.7=28
<?=2+2,_,5+3,_,17-2,_,17-1,_,17+6,_,7*6;
no digits, no strings: 68/2 = 34
<?=$p++,!$p++,$p+=$p,_,$p+=$p,_,~-$q=$p+$p,_,$q,_,--$p+$q,_,$p*~-$p;
JavaScript, 143 bytes (not sure how to score)
(g=`${2*2}`)=>g.repeat(6).replace(/(.)/g,(m,p,i,k='')=>
(k=m*[g-3,g-2,g,g,+g+2,g*3-1][i]
,RegExp(`${g-2}|${g}`).test(i)?k-1:i==+g+1?k-(g/2):k))
Start with six 4's, multiply, add, subtract by, to, from 4 to derive output.
Charcoal, 13 bytes / 2 = 6.5
IETPIHA.⁻⁸⁸℅ι
Try it online! Link is to verbose version of code. Works by subtracting the ASCII codes of the string TPIHA. from 88 and casting to string.
Jelly, 7/2 = 3.5 bytes
“ƲÞIȥ’Ḥ
Prints the numbers without separator, i.e., the integer \$4815162342\$.
How it works
“ƲÞIȥ’ is bijective base-250 integer literal.
Ʋ, Þ, I, and ȥ have (1-based) indices \$154\$, \$21\$, \$74\$, and \$171\$ in Jelly's code page, so they encode the integer \$250^3\cdot154+250^2\cdot21+250\cdot74+171=2407581171\$.
Finally, Ḥ (unhalve) doubles the integer, yielding \$2\cdot2407581171=4815162342\$.
Doubling is necessary, because encoding the output directly leads to “¡9)Ƙ[’, which contains a digit.