Print the Lost numbers

16

3

As a big fan of the Lost TV series, I always got intrigued by the sequence of numbers that repetitively appears on the episodes. These numbers are:

\$ 4, 8, 15, 16, 23, 42\$ (A104101)

Using any programming language, write a code that outputs these numbers.

Scoring:

  • Shortest answer wins

  • The output must not contain any other numbers or letters. You may use any other character as separator, or even no separator at all.

  • You cannot separate digits of the same number. \$ 48\_15162342 \$ is a valid answer, but \$481\_5162342\$ is not.

  • You must respect the order.

  • If your code does not contain any of the numbers from the sequence, reduce your score by 30%. This rule does allow you to enter the digits separately. E.g.:

    abcde1fg5h
    

    Is a valid candidate because the answer does not contain the number \$15\$, only its digits. However, any \$4\$ or \$8\$ will invalidate the bonus.

  • If the code does not contain any digit at all, reduce your score by 50%. Other characters like \$¹\$, \$²\$ or \$³\$ are still valid for this bonus.

Eduardo Hoefel

Posted 2018-11-05T00:59:04.610

Reputation: 587

2

Related, closed question: https://codegolf.stackexchange.com/q/23808/67312

– Giuseppe – 2018-11-05T01:56:24.997

2

Vaguely related: Are you lost yet?

– Dennis – 2018-11-05T01:57:21.163

1Do we have to print them in that order? – Titus – 2018-11-05T05:38:06.503

6

For future reference, we have a restricted-source tag that could have been used here: although most answers are avoiding obvious solutions, I think the challenge would have been slightly more interesting if using digits were forbidden altogether.

– Arnauld – 2018-11-05T11:07:42.230

Answers

31

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

Jo King

Posted 2018-11-05T00:59:04.610

Reputation: 38 234

11

Jelly, 7/2 = 3.5 bytes

“ƲÞIȥ’Ḥ

Prints the numbers without separator, i.e., the integer \$4815162342\$.

Try it online!

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.

Dennis

Posted 2018-11-05T00:59:04.610

Reputation: 196 637

9

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

Try it online!

Okx

Posted 2018-11-05T00:59:04.610

Reputation: 15 025

6

Python 3, 25 bytes, 12.5 points

print(*map(ord,'ዏٗ*'))

Try it online!

(髒, ⿰馬葬), (謚, ⿰言⿱⿵八一皿) cost 4 bytes, but U+0657 only cost 2 bytes...


Python 3, 29 bytes, 14.5 points

print(ord('')*ord('湡'))

Try it online!

(⿰馬葬) is variant character of 髒 which means "dirty". 湡 is the name of a river. And they are nothing related to this question as I known.

tsh

Posted 2018-11-05T00:59:04.610

Reputation: 13 072

I asked about separator rules and we can use any individual separator which makes 4815 162342 valid. Thus print(*map(ord,'ዏ')) saves 1.5 points :) (print(*map(ord,'밗')) would save 2 points but has been specified as invalid).

– Jonathan Allan – 2018-11-05T19:13:19.217

6

05AB1E, score: 10 9 7 bytes / 2 = 3.5

•‘o]Ê•·

Try it online.

Or 7 bytes alternative:

•’µ[%•R

Try it online.

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.

Try it online.

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

Kevin Cruijssen

Posted 2018-11-05T00:59:04.610

Reputation: 67 575

1You could have •ΓƒÇ²•т;в for 4.5 as post-script numbers are okay for the bonus. – Emigna – 2018-11-05T09:50:53.517

@Emigna Ah, nice! Thanks. – Kevin Cruijssen – 2018-11-05T09:56:33.150

6

JavaScript (ES7), 34/2 = 17 bytes

_=>eval(atob`NjUwNTgxMDErNDEqKjY`)

Try it online!

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

Try it online!

Arnauld

Posted 2018-11-05T00:59:04.610

Reputation: 111 334

4

Brain-Flak, 52/2 == 26 bytes

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

Try it online!

James

Posted 2018-11-05T00:59:04.610

Reputation: 54 537

4

Java 8, score: 12 11.9 (70% of 17 bytes)

v->767*6277917L+3

-0.1 score thanks to @RickHitchcock.

Try it online.

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.

Try it online.

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

Try it online.

Kevin Cruijssen

Posted 2018-11-05T00:59:04.610

Reputation: 67 575

1I like this one. Pretty short for being Java :) – Emigna – 2018-11-05T09:58:05.150

@Emigna Thanks. It's too bad it requires the cast to long and doesn't support very large unicode characters. If it weren't for those two restrictions mentioned, just v->''*'湡' (15 bytes, score 7.5) would have been enough. But it's still very short indeed. :) Although Java mostly has many, many weaknesses in terms of codegolfing (duhh..), calculating with characters because we aren't allowed to use digits is one of its few strengths. Was also pretty useful in this rather similar answer of mine.

– Kevin Cruijssen – 2018-11-05T10:02:44.347

111.9 bytes: v->767*6277917L+3 – Rick Hitchcock – 2018-11-05T23:04:19.737

3@RickHitchcock It's not every day we see a 0.1 byte saving. ;) – Arnauld – 2018-11-05T23:23:48.637

@RickHitchcock Thanks! And I agree with Arnauld's comment above. :D – Kevin Cruijssen – 2018-11-06T08:55:44.470

Every little bit counts. ;) – Rick Hitchcock – 2018-11-06T13:20:27.400

4

R, 18x0.7 = 12.6 score

cat(9*2*267509019)

Fairly self explanatory, just does some arithmetic avoiding the numbers in question.

JDL

Posted 2018-11-05T00:59:04.610

Reputation: 1 135

4

7, 10 bytes, 27 characters

115160723426754314105574033

Try it online!

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.

ais523

Posted 2018-11-05T00:59:04.610

Reputation: 11

It feels weird that you've got no reputation, despite posting some pretty good answers. I've read your reasoning behind posting only community answers, and I fully support you in that, but it must get annoying sometimes to not be able to comment :( – Jo King – 2018-11-09T12:40:33.300

@JoKing: Well, it inspired me to actually post an answer to this question, and it turned out to be much more interesting than I expected. So I guess this is more evidence for my hypothesis that if you aren't seeking reputation, your contributions end up more beneficial for the site than otherwise. (Actually, the major frustration I have with being permanently stuck at 11 reputation is that I can't suggest edits on Meta, meaning that if I see misinformation there, I have no way to correct it.) – ais523 – 2018-11-09T18:08:43.363

3

05AB1E, 6*0.7 = 4.2 bytes

•1Z&ð“

Try it online!

Prints the number uncompressed from base-255

Emigna

Posted 2018-11-05T00:59:04.610

Reputation: 50 798

You beat me to it. ;) – Kevin Cruijssen – 2018-11-05T09:05:38.670

3

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

640KB

Posted 2018-11-05T00:59:04.610

Reputation: 7 149

2

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.

Neil

Posted 2018-11-05T00:59:04.610

Reputation: 95 035

2

Aheui (esotope), 45 bytes(15 chars) * 0.5 = 22.5 points

반밤밪박밭빠따받발따밣뱣히망어

Try it online!


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.

cobaltp

Posted 2018-11-05T00:59:04.610

Reputation: 401

2

Perl 5, 16 bytes - 30% = 11.2

say 0x5FAB2EA2*3

Try it online!

Xcali

Posted 2018-11-05T00:59:04.610

Reputation: 7 671

2

PowerShell, 12 bytes * 0.7 = 8.4

0x5FAB2EA2*3

Try it online!

"Port" of Xcali's answer to have a better Powershell answer.

Veskah

Posted 2018-11-05T00:59:04.610

Reputation: 3 580

2

naz, 46 bytes, score 32.2

2a2a1o2m1o7s1o5m1o2s2s1o6m1o2s2s1o1a1o1a1o2s1o

Simply outputs each digit in 4815162342 one at a time.

sporeball

Posted 2018-11-05T00:59:04.610

Reputation: 461

1

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

Try it online!

Start with six 4's, multiply, add, subtract by, to, from 4 to derive output.

guest271314

Posted 2018-11-05T00:59:04.610

Reputation: 1

2Ok, you were trying to get the bonus, but with a code this size, it didn't compensate.

Why not simply '4815162342'? – Eduardo Hoefel – 2018-11-05T02:24:14.440

@EduardoHoefel Do not gather the "score" or "bonus" system, did not try to get the bonus, just tried to not use any of the numbers required at output. The code outputs the numbers without hardcoding any of the numbers. The number 4, with addition, subtraction, multiplication and the index of the number 4 within a string (or array) can be used to derive the required numbers. – guest271314 – 2018-11-05T02:30:39.260

Your score is 143*0.7=100.1 – Jo King – 2018-11-05T02:45:43.233

1

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)

Try it online!

guest271314

Posted 2018-11-05T00:59:04.610

Reputation: 1

1print(a=-~-~-~-~[],a+=a,b=a+~-a,a+a,a+b,--b+b+b) – tsh – 2018-11-05T07:34:22.623

2

Or just print(4815162342) for 17 bytes

– Jo King – 2018-11-05T08:11:54.217

1

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;

Try them online.

Titus

Posted 2018-11-05T00:59:04.610

Reputation: 13 814

1

Or just 14 bytes for <?=4815162342;

– Jo King – 2018-11-05T08:09:32.173

1OP hasn´t replied to wether we can omit the delimiters or not; but yeah. Why not just 10 bytes: 4815162342. Or <?=~ + 10 unprintables -> 15/2=7.5 – Titus – 2018-11-05T14:31:43.450

1

Japt, 10 9 bytes / 2 = 4.5

"0¢*"mc

Test it

Shaggy

Posted 2018-11-05T00:59:04.610

Reputation: 24 623

1

APL(Dyalog Unicode), 18/2 = 9 bytes

×/⎕UCS'湡'

Just boring old character multiplication.

Try it online!

Quintec

Posted 2018-11-05T00:59:04.610

Reputation: 2 801

1

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 Manipulation
  • S: Push number
  • S/T: Positive/negative respectively
  • Some T/S followed by a single N: Decimal as binary, where T is 1 and S is 0

After that it is simply printed with TNST:

  • TN: Enable I/O
  • S: Output the top of the stack
  • T: As number

Kevin Cruijssen

Posted 2018-11-05T00:59:04.610

Reputation: 67 575

Is just pushing the number itself longer than having the extra multiply and push integer instructions? – Jo King – 2018-11-05T22:58:40.920

@JoKing I usually use the vii5ard online Whitespace compiler, since it has highlighting and showing the commands at the left. But apparently it works similar as Java integers in that the maximum is 32-bits, and it wraps around to the negative above that.. So the number was too big to be pushed in one go. When I push the number in TIO it works fine though, I now realize.

– Kevin Cruijssen – 2018-11-06T08:00:20.387

1

JavaScript (ES6), 16 * 0.7 = 11.2 bytes

_=>767*6277917+3

Outputs the digits with no delimiters.

Try It Online!

Rick Hitchcock

Posted 2018-11-05T00:59:04.610

Reputation: 2 461

1

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 '@'];;

dumetrulo

Posted 2018-11-05T00:59:04.610

Reputation: 131

1

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='')

Try it online!

glietz

Posted 2018-11-05T00:59:04.610

Reputation: 101

1

Pyke, 3 points

77 91 f8 86 98 06

Try it here!

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

Blue

Posted 2018-11-05T00:59:04.610

Reputation: 26 661

1

MathGolf, 7 bytes * 0.5 = 3.5

ÿ≤┼ÇÅ$∞

Try it online!

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.

maxb

Posted 2018-11-05T00:59:04.610

Reputation: 5 754

1

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)

CodeGolfer

Posted 2018-11-05T00:59:04.610

Reputation: 31

1

C# (.NET Core), 17 bytes *.7 = 11.9 bytes.

Ascii-Only's version.

()=>0x5FAB2EA2l*3

Try it online!

C# (.NET Core), 42 bytes, score = 42/2 = 21

Uses the F386 and BC17 characters.

()=>{return $"{(int)'밗'}{(int)''}";};

Try it online!

Destroigo

Posted 2018-11-05T00:59:04.610

Reputation: 401

117 (*.7) – ASCII-only – 2019-02-26T01:48:31.657

1

Befunge-98 (FBBI), 15 bytes / 2 = 7.5 points

"*H/!k-"*.*+..@

Try it online!

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.

Wisław

Posted 2018-11-05T00:59:04.610

Reputation: 554

1

Runic Enchantments, 15/2 = 7.5

\>`*`
Rn$!;

Try it online!

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.

Draco18s no longer trusts SE

Posted 2018-11-05T00:59:04.610

Reputation: 3 053

1

Keg, 8 - 50% = 4 bytes

밗..

Try it online!

Answer History

10 - 50% = 5 bytes


Try it online!

Literally just prints the number 4815162342 using the push'n'print method.

Lyxal

Posted 2018-11-05T00:59:04.610

Reputation: 5 253

1밗.. isn't 4 bytes is it? – Adám – 2019-12-19T08:34:14.337

1@Adám, it's 4 bytes after the bonus is applied. – Lyxal – 2019-12-19T08:51:40.383

1

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

user85052

Posted 2018-11-05T00:59:04.610

Reputation:

1

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

pppery

Posted 2018-11-05T00:59:04.610

Reputation: 3 987

0

Python 2, 16 bytes

print 4815162342

Try it online!

Vedant Kandoi

Posted 2018-11-05T00:59:04.610

Reputation: 1 955

0

Red, 50 bytes / 2 = 25

foreach c"abcdcefgaf"[prin index? find"cfgade.b"c]

Try it online!

Prints the numbers without separator

Galen Ivanov

Posted 2018-11-05T00:59:04.610

Reputation: 13 815

0

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__

user73921

Posted 2018-11-05T00:59:04.610

Reputation:

0

Z80Golf, 17 bytes * 0.5 = 8.5

00000000: 1b17 1e1a 1e19 1d1c 1b1d 2676 0a03 c5ee  ..........&v....
00000010: 2f                                       /

Try it online!

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

Assembly

Logern

Posted 2018-11-05T00:59:04.610

Reputation: 845

0

Wolfram Language (Mathematica), 68 bytes (score 34)

#&@@@"distinctive pattern nothing is known about"~StringPosition~"t"

Try it online!

Prints the list {4,8,15,16,23,42}.

Misha Lavrov

Posted 2018-11-05T00:59:04.610

Reputation: 4 846

0

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

BradC

Posted 2018-11-05T00:59:04.610

Reputation: 6 099

0

Perl 6, 17 bytes * 0.5 = 8.5

say ords "*"

Try it online!

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

Try it online!

Which in turn beats the plain solution of 14 bytes:

say 4815162342

Try it online!

Jo King

Posted 2018-11-05T00:59:04.610

Reputation: 38 234

0

Python 2, 38 * 0.5 = 19 score 34 bytes * 0.5 = 17 score

print map(`int`.find,"ent t'ypey")

Try it online!

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)

Try it online!

Chas Brown

Posted 2018-11-05T00:59:04.610

Reputation: 8 959

0

Lua, 69 bytes / 2 = 34.5 points

a={"","","","","","*"}s=" "for i=#s,#a do print(s.byte(a[i]))end

Try it online!

ouflak

Posted 2018-11-05T00:59:04.610

Reputation: 925

0

Powershell, 10 bytes, score 10

4815162342

mazzy

Posted 2018-11-05T00:59:04.610

Reputation: 4 832

0

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.

12Me21

Posted 2018-11-05T00:59:04.610

Reputation: 6 110

0

brainfuck, 55 bytes

-[>+<-----]>+.++++.-------.++++.----.+++++.----.+.+.--.

Try it online!

Cortex

Posted 2018-11-05T00:59:04.610

Reputation: 97

I assume you used brainfuck constants, correct me if I am wrong. Please calculate your score and add it to your answer.

– Jonathan Frech – 2019-02-26T02:20:05.787

0

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!

Try it online!

KrystosTheOverlord

Posted 2018-11-05T00:59:04.610

Reputation: 681

0

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

remoel

Posted 2018-11-05T00:59:04.610

Reputation: 511

Err! yeah you are correct. wth am I thinking. Thanks! :D – remoel – 2019-03-01T07:07:50.973

You can rearrange this to get rid of both temporary variables a and b. For Each x in Split(" "):?Asc(x)&"";:Next --- I am not sure if it will keep the non-printing characters when I comment this, but if it does not, the string is the same as is held in a in your current version – Taylor Scott – 2019-03-01T16:08:44.623

Actually, looking at it a second time, you can drop the split entirely and iterate over the string to get it down further - 47 bytes, 23.5 points For i=1To 10:?Asc(Mid("",i))&"";:Next, where the string in the Mid statement holds the string string output by For i=1To 10:?Chr(Mid(4815162342,i,1));:Next – Taylor Scott – 2019-03-02T15:26:05.227