Couch 2048: How much more till 2048?










19












$begingroup$


I have just tried a game called Couch 2048.

(Note: You should have a look to better understand this question.)

Since it wasn't very exciting for me, I've been asking myself 'How much more till 2048!?'

That inspired me to post a challenge, because calculating this in not as easy as I thought.



Your goal:

Given a list of balls on the sofa, you have to output how many balls with a value of 2 have to fall from the sky so that one can win the game (by reaching the 2048 ball).



  • Assume the input is valid.

  • Assume the player won't drop any balls.

  • Assume the balls which fall from the sky always have a value of 2, as I've said.

  • Valid output examples: 3, "4", [5], ["6"]

Edit:

I should clarify something:

- You have to print the smallest amount of 2s needed.



Test cases:
[2048] -> 0 You've already won
[1024,1024] -> 0 You don't need any more balls to win
[1024,512,256,128,64,32,16,8,4,2] -> 1 One ball required to 'activate the chain'
[512] -> 768
[512,2] -> 767
[4,16,64] -> 982



Notes:

I'm not a native speaker - Tell me if you spotted a typo or some non-grammatical text.

If something's unclear, ask in comments.










share|improve this question











$endgroup$











  • $begingroup$
    why [4,16,64] -> 22?
    $endgroup$
    – l4m2
    Nov 12 '18 at 12:43






  • 3




    $begingroup$
    Welcome to PPCG. It looks like this challenge is: add all the elements in the array, subtract from 2048 and divide by 2 - if so, you might want to double check the last test case - if not, please use it as an example to explain why the output isn't 982.
    $endgroup$
    – Shaggy
    Nov 12 '18 at 12:45






  • 1




    $begingroup$
    @Shaggy thx for noticing a silly mistake
    $endgroup$
    – user83982
    Nov 12 '18 at 12:47






  • 4




    $begingroup$
    Woah, I haven't thought my first challenge will have 7 answers and 2 upvotes in the first hour! And I reached to ~28 people!
    $endgroup$
    – user83982
    Nov 12 '18 at 13:31






  • 2




    $begingroup$
    Hey, downvoter: explain your point of view! It's necessary for the challenge to improve!
    $endgroup$
    – user83982
    Nov 13 '18 at 15:41















19












$begingroup$


I have just tried a game called Couch 2048.

(Note: You should have a look to better understand this question.)

Since it wasn't very exciting for me, I've been asking myself 'How much more till 2048!?'

That inspired me to post a challenge, because calculating this in not as easy as I thought.



Your goal:

Given a list of balls on the sofa, you have to output how many balls with a value of 2 have to fall from the sky so that one can win the game (by reaching the 2048 ball).



  • Assume the input is valid.

  • Assume the player won't drop any balls.

  • Assume the balls which fall from the sky always have a value of 2, as I've said.

  • Valid output examples: 3, "4", [5], ["6"]

Edit:

I should clarify something:

- You have to print the smallest amount of 2s needed.



Test cases:
[2048] -> 0 You've already won
[1024,1024] -> 0 You don't need any more balls to win
[1024,512,256,128,64,32,16,8,4,2] -> 1 One ball required to 'activate the chain'
[512] -> 768
[512,2] -> 767
[4,16,64] -> 982



Notes:

I'm not a native speaker - Tell me if you spotted a typo or some non-grammatical text.

If something's unclear, ask in comments.










share|improve this question











$endgroup$











  • $begingroup$
    why [4,16,64] -> 22?
    $endgroup$
    – l4m2
    Nov 12 '18 at 12:43






  • 3




    $begingroup$
    Welcome to PPCG. It looks like this challenge is: add all the elements in the array, subtract from 2048 and divide by 2 - if so, you might want to double check the last test case - if not, please use it as an example to explain why the output isn't 982.
    $endgroup$
    – Shaggy
    Nov 12 '18 at 12:45






  • 1




    $begingroup$
    @Shaggy thx for noticing a silly mistake
    $endgroup$
    – user83982
    Nov 12 '18 at 12:47






  • 4




    $begingroup$
    Woah, I haven't thought my first challenge will have 7 answers and 2 upvotes in the first hour! And I reached to ~28 people!
    $endgroup$
    – user83982
    Nov 12 '18 at 13:31






  • 2




    $begingroup$
    Hey, downvoter: explain your point of view! It's necessary for the challenge to improve!
    $endgroup$
    – user83982
    Nov 13 '18 at 15:41













19












19








19


1



$begingroup$


I have just tried a game called Couch 2048.

(Note: You should have a look to better understand this question.)

Since it wasn't very exciting for me, I've been asking myself 'How much more till 2048!?'

That inspired me to post a challenge, because calculating this in not as easy as I thought.



Your goal:

Given a list of balls on the sofa, you have to output how many balls with a value of 2 have to fall from the sky so that one can win the game (by reaching the 2048 ball).



  • Assume the input is valid.

  • Assume the player won't drop any balls.

  • Assume the balls which fall from the sky always have a value of 2, as I've said.

  • Valid output examples: 3, "4", [5], ["6"]

Edit:

I should clarify something:

- You have to print the smallest amount of 2s needed.



Test cases:
[2048] -> 0 You've already won
[1024,1024] -> 0 You don't need any more balls to win
[1024,512,256,128,64,32,16,8,4,2] -> 1 One ball required to 'activate the chain'
[512] -> 768
[512,2] -> 767
[4,16,64] -> 982



Notes:

I'm not a native speaker - Tell me if you spotted a typo or some non-grammatical text.

If something's unclear, ask in comments.










share|improve this question











$endgroup$




I have just tried a game called Couch 2048.

(Note: You should have a look to better understand this question.)

Since it wasn't very exciting for me, I've been asking myself 'How much more till 2048!?'

That inspired me to post a challenge, because calculating this in not as easy as I thought.



Your goal:

Given a list of balls on the sofa, you have to output how many balls with a value of 2 have to fall from the sky so that one can win the game (by reaching the 2048 ball).



  • Assume the input is valid.

  • Assume the player won't drop any balls.

  • Assume the balls which fall from the sky always have a value of 2, as I've said.

  • Valid output examples: 3, "4", [5], ["6"]

Edit:

I should clarify something:

- You have to print the smallest amount of 2s needed.



Test cases:
[2048] -> 0 You've already won
[1024,1024] -> 0 You don't need any more balls to win
[1024,512,256,128,64,32,16,8,4,2] -> 1 One ball required to 'activate the chain'
[512] -> 768
[512,2] -> 767
[4,16,64] -> 982



Notes:

I'm not a native speaker - Tell me if you spotted a typo or some non-grammatical text.

If something's unclear, ask in comments.







code-golf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 14:06

























asked Nov 12 '18 at 12:34







user83982


















  • $begingroup$
    why [4,16,64] -> 22?
    $endgroup$
    – l4m2
    Nov 12 '18 at 12:43






  • 3




    $begingroup$
    Welcome to PPCG. It looks like this challenge is: add all the elements in the array, subtract from 2048 and divide by 2 - if so, you might want to double check the last test case - if not, please use it as an example to explain why the output isn't 982.
    $endgroup$
    – Shaggy
    Nov 12 '18 at 12:45






  • 1




    $begingroup$
    @Shaggy thx for noticing a silly mistake
    $endgroup$
    – user83982
    Nov 12 '18 at 12:47






  • 4




    $begingroup$
    Woah, I haven't thought my first challenge will have 7 answers and 2 upvotes in the first hour! And I reached to ~28 people!
    $endgroup$
    – user83982
    Nov 12 '18 at 13:31






  • 2




    $begingroup$
    Hey, downvoter: explain your point of view! It's necessary for the challenge to improve!
    $endgroup$
    – user83982
    Nov 13 '18 at 15:41
















  • $begingroup$
    why [4,16,64] -> 22?
    $endgroup$
    – l4m2
    Nov 12 '18 at 12:43






  • 3




    $begingroup$
    Welcome to PPCG. It looks like this challenge is: add all the elements in the array, subtract from 2048 and divide by 2 - if so, you might want to double check the last test case - if not, please use it as an example to explain why the output isn't 982.
    $endgroup$
    – Shaggy
    Nov 12 '18 at 12:45






  • 1




    $begingroup$
    @Shaggy thx for noticing a silly mistake
    $endgroup$
    – user83982
    Nov 12 '18 at 12:47






  • 4




    $begingroup$
    Woah, I haven't thought my first challenge will have 7 answers and 2 upvotes in the first hour! And I reached to ~28 people!
    $endgroup$
    – user83982
    Nov 12 '18 at 13:31






  • 2




    $begingroup$
    Hey, downvoter: explain your point of view! It's necessary for the challenge to improve!
    $endgroup$
    – user83982
    Nov 13 '18 at 15:41















$begingroup$
why [4,16,64] -> 22?
$endgroup$
– l4m2
Nov 12 '18 at 12:43




$begingroup$
why [4,16,64] -> 22?
$endgroup$
– l4m2
Nov 12 '18 at 12:43




3




3




$begingroup$
Welcome to PPCG. It looks like this challenge is: add all the elements in the array, subtract from 2048 and divide by 2 - if so, you might want to double check the last test case - if not, please use it as an example to explain why the output isn't 982.
$endgroup$
– Shaggy
Nov 12 '18 at 12:45




$begingroup$
Welcome to PPCG. It looks like this challenge is: add all the elements in the array, subtract from 2048 and divide by 2 - if so, you might want to double check the last test case - if not, please use it as an example to explain why the output isn't 982.
$endgroup$
– Shaggy
Nov 12 '18 at 12:45




1




1




$begingroup$
@Shaggy thx for noticing a silly mistake
$endgroup$
– user83982
Nov 12 '18 at 12:47




$begingroup$
@Shaggy thx for noticing a silly mistake
$endgroup$
– user83982
Nov 12 '18 at 12:47




4




4




$begingroup$
Woah, I haven't thought my first challenge will have 7 answers and 2 upvotes in the first hour! And I reached to ~28 people!
$endgroup$
– user83982
Nov 12 '18 at 13:31




$begingroup$
Woah, I haven't thought my first challenge will have 7 answers and 2 upvotes in the first hour! And I reached to ~28 people!
$endgroup$
– user83982
Nov 12 '18 at 13:31




2




2




$begingroup$
Hey, downvoter: explain your point of view! It's necessary for the challenge to improve!
$endgroup$
– user83982
Nov 13 '18 at 15:41




$begingroup$
Hey, downvoter: explain your point of view! It's necessary for the challenge to improve!
$endgroup$
– user83982
Nov 13 '18 at 15:41










27 Answers
27






active

oldest

votes


















11












$begingroup$

Java 8, 17 bytes





s->1024-s.sum()/2


Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



Try it online.



Explanation:



s-> // Method with IntStream parameter and int return-type
1024- // Return 1024, minus:
s.sum() // The sum of the input-IntStream
/2 // Divided by 2





share|improve this answer









$endgroup$








  • 11




    $begingroup$
    That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
    $endgroup$
    – Quintec
    Nov 12 '18 at 14:06


















8












$begingroup$


Brain-Flak, 72 bytes



()(<([()()])>())([]((((((((()()()())))))))))


Try it online!



() # Sum entire stack
( ) # Push:
< >() # The number of times you can...
([()()]) # Subtract 2 before reaching 0

([] ) # Subtract that from...
((((((((()()()())))))))) # 1024





share|improve this answer









$endgroup$












  • $begingroup$
    Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
    $endgroup$
    – Galen Ivanov
    Nov 13 '18 at 7:49


















6












$begingroup$


Python 2, 22 bytes





lambda x:4**5-sum(x)/2


Y'know, I just realized that 4**5 is the same length as 1024.



Try it online!






share|improve this answer









$endgroup$




















    6












    $begingroup$


    MathGolf, 6 5 bytes



    Σc/◘+


    First MathGolf answer. :)



    Try it online or verify all test cases.



    Explanation:





    Σ # Sum of the (implicit) input-list
    c/ # Divide it by -2
    ◘+ # Add 1024 to it (and output implicitly)





    share|improve this answer











    $endgroup$




















      5












      $begingroup$


      05AB1E, 5 bytes



      O;žBα


      Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



      Try it online or verify all test cases.



      Explanation:





      O # Sum of the (implicit) input-list
      ; # Halved
      žB # Push 1024
      α # Absolute difference between the two (and output implicitly)





      share|improve this answer









      $endgroup$




















        3












        $begingroup$


        APL (Dyalog Unicode), 10 bytes





        2÷⍨2048-+/


        Try it online!






        share|improve this answer









        $endgroup$




















          3












          $begingroup$


          JavaScript (Node.js), 25 bytes



          Based on @Shaggys' comment and answer



          -3 bytes from @Arnauld =D





          _=>1024-eval(_.join`+`)/2


          Try it online!






          share|improve this answer











          $endgroup$




















            2












            $begingroup$


            J, 10 bytes



            2048-:@-+/


            Try it online!



            Alternative:




            J, 10 bytes



            1024-1#.-:


            Try it online!






            share|improve this answer











            $endgroup$




















              2












              $begingroup$


              Ruby, 17 bytes





              ->l1024-l.sum/2


              Try it online!






              share|improve this answer









              $endgroup$




















                2












                $begingroup$

                TI-Basic, 8 bytes



                4^5-.5sum(Ans





                share|improve this answer









                $endgroup$




















                  1












                  $begingroup$

                  JavaScript, 28 bytes



                  a=>a.map(n=>x-=n/2,x=1024)|x


                  Try it online






                  share|improve this answer









                  $endgroup$




















                    1












                    $begingroup$


                    Jelly, 7 6 bytes



                    HSạ⁽¡ç


                    Try it online!



                    Explanation:



                    HSạ⁽¡ç Example input: [4,16,64]
                    H Halve input. [2, 8, 32]
                    S Sum. 42
                    ⁽¡ç Number 1024.
                    ạ Difference. 982


                    -1 byte by using a base-250 number






                    share|improve this answer











                    $endgroup$




















                      1












                      $begingroup$


                      Catholicon, 5 bytes



                      -`L̇½Ṗ


                      Explanation:



                      - subtract
                      `L̇ 1024
                      from
                      ½ half of the
                      Ṗ sum [of the input]





                      share|improve this answer









                      $endgroup$








                      • 1




                        $begingroup$
                        Is that a new golfing language I smell? :)
                        $endgroup$
                        – ETHproductions
                        Nov 12 '18 at 21:37






                      • 1




                        $begingroup$
                        +1 for the new language. Another one to learn </sigh>
                        $endgroup$
                        – ElPedro
                        Nov 12 '18 at 22:10


















                      1












                      $begingroup$

                      Japt, 7 6 bytes



                      xz nH²


                      Try it or verify all test cases



                       z :(Floor) divide each by 2
                      x :Reduce by addition
                      n :Subtract from
                      H : 32
                      ² : Squared





                      share|improve this answer











                      $endgroup$




















                        1












                        $begingroup$

                        perl -aE, 27 bytes



                        $"=$:;say eval"(2048-@F)/2"


                        This reads a line with numbers (whitespace separated) from STDIN, and writes the answer to STDOUT.



                        What it does is subtract all the numbers from the input from 2048, and it divides the remainder by 2. The -a switch puts the in the array @F (one number per element). If we interpolate an array into a string (which is what we are doing here), perl puts the value of $" between the elements. The little used variable $: is be default n-; and since white space between tokens is ignored, the result is subtracting all the numbers from 2048. The eval does the calculation.






                        share|improve this answer









                        $endgroup$




















                          0












                          $begingroup$


                          JavaScript (Node.js), 33 bytes





                          a=>!a.map(n=>x-=n/2,x=1024)>x?0:x


                          Try it online!



                          Why you don't do on [1024,1024,1024]?






                          share|improve this answer









                          $endgroup$




















                            0












                            $begingroup$


                            R, 17 bytes





                            4^5-sum(scan())/2


                            Try it online!






                            share|improve this answer









                            $endgroup$




















                              0












                              $begingroup$


                              TeaScript, 11 bytes





                              4p5)-(xx)/2


                              Try it online!






                              share|improve this answer









                              $endgroup$




















                                0












                                $begingroup$


                                Stax, 6 bytes



                                ë3i─♠÷


                                Run and debug it






                                share|improve this answer









                                $endgroup$




















                                  0












                                  $begingroup$


                                  Perl 6, 12 bytes





                                  1024-*.sum/2


                                  Try it online!



                                  Anonymous Whatever lambda that takes a list and returns a number.






                                  share|improve this answer









                                  $endgroup$




















                                    0












                                    $begingroup$

                                    AWK, 26 bytes



                                    s+=$1ENDprint 1024-s/2


                                    Input numbers are separated by newlines (i.e. one per line)






                                    share|improve this answer









                                    $endgroup$




















                                      0












                                      $begingroup$

                                      Neim, 6 bytes



                                      Pretty new to Neim but got it working



                                      𝐬ᚺςᚫᛦ𝕤


                                      Explanation:



                                       𝐬 : Sum input
                                      ᚺ : Divide by 2 (stack now [input summed and divided by 2])
                                      ς : Variable set to 16 pushed to stack
                                      ᚫ : Multiply by 2
                                      ᛦ : Square (stack now [input summed and divided by 2, 1024])
                                      𝕤 : Subtract then absolute


                                      Try it online!






                                      share|improve this answer









                                      $endgroup$




















                                        0












                                        $begingroup$

                                        JAVA, 30 bytes



                                        2048-IntStream.of(a).sum()/2;





                                        share|improve this answer









                                        $endgroup$




















                                          0












                                          $begingroup$


                                          RAD, 10 bytes



                                          1024-+/ω÷2


                                          Try it online!






                                          share|improve this answer









                                          $endgroup$




















                                            0












                                            $begingroup$


                                            Clojure, 24 bytes





                                            #(- 1024(/(apply + %)2))


                                            Try it online!






                                            share|improve this answer









                                            $endgroup$




















                                              0












                                              $begingroup$


                                              Haskell, 16 bytes





                                              (1024-).(/2).sum


                                              An anonymous function, takes a list and returns a float.



                                              Try it online!






                                              share|improve this answer









                                              $endgroup$




















                                                0












                                                $begingroup$

                                                F#, 24 bytes



                                                fun f->1024-List.sum f/2


                                                1024 minus the sum divided by 2.






                                                share|improve this answer









                                                $endgroup$












                                                  Your Answer





                                                  StackExchange.ifUsing("editor", function ()
                                                  return StackExchange.using("mathjaxEditing", function ()
                                                  StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
                                                  StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
                                                  );
                                                  );
                                                  , "mathjax-editing");

                                                  StackExchange.ifUsing("editor", function ()
                                                  StackExchange.using("externalEditor", function ()
                                                  StackExchange.using("snippets", function ()
                                                  StackExchange.snippets.init();
                                                  );
                                                  );
                                                  , "code-snippets");

                                                  StackExchange.ready(function()
                                                  var channelOptions =
                                                  tags: "".split(" "),
                                                  id: "200"
                                                  ;
                                                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                                                  StackExchange.using("externalEditor", function()
                                                  // Have to fire editor after snippets, if snippets enabled
                                                  if (StackExchange.settings.snippets.snippetsEnabled)
                                                  StackExchange.using("snippets", function()
                                                  createEditor();
                                                  );

                                                  else
                                                  createEditor();

                                                  );

                                                  function createEditor()
                                                  StackExchange.prepareEditor(
                                                  heartbeatType: 'answer',
                                                  autoActivateHeartbeat: false,
                                                  convertImagesToLinks: false,
                                                  noModals: true,
                                                  showLowRepImageUploadWarning: true,
                                                  reputationToPostImages: null,
                                                  bindNavPrevention: true,
                                                  postfix: "",
                                                  imageUploader:
                                                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                                                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                                                  allowUrls: true
                                                  ,
                                                  onDemand: true,
                                                  discardSelector: ".discard-answer"
                                                  ,immediatelyShowMarkdownHelp:true
                                                  );



                                                  );













                                                  draft saved

                                                  draft discarded


















                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f175765%2fcouch-2048-how-much-more-till-2048%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest















                                                  Required, but never shown
























                                                  27 Answers
                                                  27






                                                  active

                                                  oldest

                                                  votes








                                                  27 Answers
                                                  27






                                                  active

                                                  oldest

                                                  votes









                                                  active

                                                  oldest

                                                  votes






                                                  active

                                                  oldest

                                                  votes









                                                  11












                                                  $begingroup$

                                                  Java 8, 17 bytes





                                                  s->1024-s.sum()/2


                                                  Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                  Try it online.



                                                  Explanation:



                                                  s-> // Method with IntStream parameter and int return-type
                                                  1024- // Return 1024, minus:
                                                  s.sum() // The sum of the input-IntStream
                                                  /2 // Divided by 2





                                                  share|improve this answer









                                                  $endgroup$








                                                  • 11




                                                    $begingroup$
                                                    That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
                                                    $endgroup$
                                                    – Quintec
                                                    Nov 12 '18 at 14:06















                                                  11












                                                  $begingroup$

                                                  Java 8, 17 bytes





                                                  s->1024-s.sum()/2


                                                  Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                  Try it online.



                                                  Explanation:



                                                  s-> // Method with IntStream parameter and int return-type
                                                  1024- // Return 1024, minus:
                                                  s.sum() // The sum of the input-IntStream
                                                  /2 // Divided by 2





                                                  share|improve this answer









                                                  $endgroup$








                                                  • 11




                                                    $begingroup$
                                                    That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
                                                    $endgroup$
                                                    – Quintec
                                                    Nov 12 '18 at 14:06













                                                  11












                                                  11








                                                  11





                                                  $begingroup$

                                                  Java 8, 17 bytes





                                                  s->1024-s.sum()/2


                                                  Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                  Try it online.



                                                  Explanation:



                                                  s-> // Method with IntStream parameter and int return-type
                                                  1024- // Return 1024, minus:
                                                  s.sum() // The sum of the input-IntStream
                                                  /2 // Divided by 2





                                                  share|improve this answer









                                                  $endgroup$



                                                  Java 8, 17 bytes





                                                  s->1024-s.sum()/2


                                                  Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                  Try it online.



                                                  Explanation:



                                                  s-> // Method with IntStream parameter and int return-type
                                                  1024- // Return 1024, minus:
                                                  s.sum() // The sum of the input-IntStream
                                                  /2 // Divided by 2






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Nov 12 '18 at 13:37









                                                  Kevin CruijssenKevin Cruijssen

                                                  39.4k560203




                                                  39.4k560203







                                                  • 11




                                                    $begingroup$
                                                    That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
                                                    $endgroup$
                                                    – Quintec
                                                    Nov 12 '18 at 14:06












                                                  • 11




                                                    $begingroup$
                                                    That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
                                                    $endgroup$
                                                    – Quintec
                                                    Nov 12 '18 at 14:06







                                                  11




                                                  11




                                                  $begingroup$
                                                  That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
                                                  $endgroup$
                                                  – Quintec
                                                  Nov 12 '18 at 14:06




                                                  $begingroup$
                                                  That feeling when Java is beating both python(because lambda syntax) and javascript(because sum)
                                                  $endgroup$
                                                  – Quintec
                                                  Nov 12 '18 at 14:06











                                                  8












                                                  $begingroup$


                                                  Brain-Flak, 72 bytes



                                                  ()(<([()()])>())([]((((((((()()()())))))))))


                                                  Try it online!



                                                  () # Sum entire stack
                                                  ( ) # Push:
                                                  < >() # The number of times you can...
                                                  ([()()]) # Subtract 2 before reaching 0

                                                  ([] ) # Subtract that from...
                                                  ((((((((()()()())))))))) # 1024





                                                  share|improve this answer









                                                  $endgroup$












                                                  • $begingroup$
                                                    Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
                                                    $endgroup$
                                                    – Galen Ivanov
                                                    Nov 13 '18 at 7:49















                                                  8












                                                  $begingroup$


                                                  Brain-Flak, 72 bytes



                                                  ()(<([()()])>())([]((((((((()()()())))))))))


                                                  Try it online!



                                                  () # Sum entire stack
                                                  ( ) # Push:
                                                  < >() # The number of times you can...
                                                  ([()()]) # Subtract 2 before reaching 0

                                                  ([] ) # Subtract that from...
                                                  ((((((((()()()())))))))) # 1024





                                                  share|improve this answer









                                                  $endgroup$












                                                  • $begingroup$
                                                    Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
                                                    $endgroup$
                                                    – Galen Ivanov
                                                    Nov 13 '18 at 7:49













                                                  8












                                                  8








                                                  8





                                                  $begingroup$


                                                  Brain-Flak, 72 bytes



                                                  ()(<([()()])>())([]((((((((()()()())))))))))


                                                  Try it online!



                                                  () # Sum entire stack
                                                  ( ) # Push:
                                                  < >() # The number of times you can...
                                                  ([()()]) # Subtract 2 before reaching 0

                                                  ([] ) # Subtract that from...
                                                  ((((((((()()()())))))))) # 1024





                                                  share|improve this answer









                                                  $endgroup$




                                                  Brain-Flak, 72 bytes



                                                  ()(<([()()])>())([]((((((((()()()())))))))))


                                                  Try it online!



                                                  () # Sum entire stack
                                                  ( ) # Push:
                                                  < >() # The number of times you can...
                                                  ([()()]) # Subtract 2 before reaching 0

                                                  ([] ) # Subtract that from...
                                                  ((((((((()()()())))))))) # 1024






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Nov 12 '18 at 14:01









                                                  RileyRiley

                                                  11k11448




                                                  11k11448











                                                  • $begingroup$
                                                    Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
                                                    $endgroup$
                                                    – Galen Ivanov
                                                    Nov 13 '18 at 7:49
















                                                  • $begingroup$
                                                    Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
                                                    $endgroup$
                                                    – Galen Ivanov
                                                    Nov 13 '18 at 7:49















                                                  $begingroup$
                                                  Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
                                                  $endgroup$
                                                  – Galen Ivanov
                                                  Nov 13 '18 at 7:49




                                                  $begingroup$
                                                  Thank you! I'm interested in learning Brain-Flak and your explanation was useful.
                                                  $endgroup$
                                                  – Galen Ivanov
                                                  Nov 13 '18 at 7:49











                                                  6












                                                  $begingroup$


                                                  Python 2, 22 bytes





                                                  lambda x:4**5-sum(x)/2


                                                  Y'know, I just realized that 4**5 is the same length as 1024.



                                                  Try it online!






                                                  share|improve this answer









                                                  $endgroup$

















                                                    6












                                                    $begingroup$


                                                    Python 2, 22 bytes





                                                    lambda x:4**5-sum(x)/2


                                                    Y'know, I just realized that 4**5 is the same length as 1024.



                                                    Try it online!






                                                    share|improve this answer









                                                    $endgroup$















                                                      6












                                                      6








                                                      6





                                                      $begingroup$


                                                      Python 2, 22 bytes





                                                      lambda x:4**5-sum(x)/2


                                                      Y'know, I just realized that 4**5 is the same length as 1024.



                                                      Try it online!






                                                      share|improve this answer









                                                      $endgroup$




                                                      Python 2, 22 bytes





                                                      lambda x:4**5-sum(x)/2


                                                      Y'know, I just realized that 4**5 is the same length as 1024.



                                                      Try it online!







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Nov 12 '18 at 14:04









                                                      QuintecQuintec

                                                      1,9281724




                                                      1,9281724





















                                                          6












                                                          $begingroup$


                                                          MathGolf, 6 5 bytes



                                                          Σc/◘+


                                                          First MathGolf answer. :)



                                                          Try it online or verify all test cases.



                                                          Explanation:





                                                          Σ # Sum of the (implicit) input-list
                                                          c/ # Divide it by -2
                                                          ◘+ # Add 1024 to it (and output implicitly)





                                                          share|improve this answer











                                                          $endgroup$

















                                                            6












                                                            $begingroup$


                                                            MathGolf, 6 5 bytes



                                                            Σc/◘+


                                                            First MathGolf answer. :)



                                                            Try it online or verify all test cases.



                                                            Explanation:





                                                            Σ # Sum of the (implicit) input-list
                                                            c/ # Divide it by -2
                                                            ◘+ # Add 1024 to it (and output implicitly)





                                                            share|improve this answer











                                                            $endgroup$















                                                              6












                                                              6








                                                              6





                                                              $begingroup$


                                                              MathGolf, 6 5 bytes



                                                              Σc/◘+


                                                              First MathGolf answer. :)



                                                              Try it online or verify all test cases.



                                                              Explanation:





                                                              Σ # Sum of the (implicit) input-list
                                                              c/ # Divide it by -2
                                                              ◘+ # Add 1024 to it (and output implicitly)





                                                              share|improve this answer











                                                              $endgroup$




                                                              MathGolf, 6 5 bytes



                                                              Σc/◘+


                                                              First MathGolf answer. :)



                                                              Try it online or verify all test cases.



                                                              Explanation:





                                                              Σ # Sum of the (implicit) input-list
                                                              c/ # Divide it by -2
                                                              ◘+ # Add 1024 to it (and output implicitly)






                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Nov 12 '18 at 14:55

























                                                              answered Nov 12 '18 at 14:45









                                                              Kevin CruijssenKevin Cruijssen

                                                              39.4k560203




                                                              39.4k560203





















                                                                  5












                                                                  $begingroup$


                                                                  05AB1E, 5 bytes



                                                                  O;žBα


                                                                  Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                                  Try it online or verify all test cases.



                                                                  Explanation:





                                                                  O # Sum of the (implicit) input-list
                                                                  ; # Halved
                                                                  žB # Push 1024
                                                                  α # Absolute difference between the two (and output implicitly)





                                                                  share|improve this answer









                                                                  $endgroup$

















                                                                    5












                                                                    $begingroup$


                                                                    05AB1E, 5 bytes



                                                                    O;žBα


                                                                    Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                                    Try it online or verify all test cases.



                                                                    Explanation:





                                                                    O # Sum of the (implicit) input-list
                                                                    ; # Halved
                                                                    žB # Push 1024
                                                                    α # Absolute difference between the two (and output implicitly)





                                                                    share|improve this answer









                                                                    $endgroup$















                                                                      5












                                                                      5








                                                                      5





                                                                      $begingroup$


                                                                      05AB1E, 5 bytes



                                                                      O;žBα


                                                                      Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                                      Try it online or verify all test cases.



                                                                      Explanation:





                                                                      O # Sum of the (implicit) input-list
                                                                      ; # Halved
                                                                      žB # Push 1024
                                                                      α # Absolute difference between the two (and output implicitly)





                                                                      share|improve this answer









                                                                      $endgroup$




                                                                      05AB1E, 5 bytes



                                                                      O;žBα


                                                                      Port of @LuisFelipeDeJesusMunoz' JavaScript answer.



                                                                      Try it online or verify all test cases.



                                                                      Explanation:





                                                                      O # Sum of the (implicit) input-list
                                                                      ; # Halved
                                                                      žB # Push 1024
                                                                      α # Absolute difference between the two (and output implicitly)






                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      answered Nov 12 '18 at 13:27









                                                                      Kevin CruijssenKevin Cruijssen

                                                                      39.4k560203




                                                                      39.4k560203





















                                                                          3












                                                                          $begingroup$


                                                                          APL (Dyalog Unicode), 10 bytes





                                                                          2÷⍨2048-+/


                                                                          Try it online!






                                                                          share|improve this answer









                                                                          $endgroup$

















                                                                            3












                                                                            $begingroup$


                                                                            APL (Dyalog Unicode), 10 bytes





                                                                            2÷⍨2048-+/


                                                                            Try it online!






                                                                            share|improve this answer









                                                                            $endgroup$















                                                                              3












                                                                              3








                                                                              3





                                                                              $begingroup$


                                                                              APL (Dyalog Unicode), 10 bytes





                                                                              2÷⍨2048-+/


                                                                              Try it online!






                                                                              share|improve this answer









                                                                              $endgroup$




                                                                              APL (Dyalog Unicode), 10 bytes





                                                                              2÷⍨2048-+/


                                                                              Try it online!







                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Nov 12 '18 at 13:03









                                                                              J. SalléJ. Sallé

                                                                              1,948322




                                                                              1,948322





















                                                                                  3












                                                                                  $begingroup$


                                                                                  JavaScript (Node.js), 25 bytes



                                                                                  Based on @Shaggys' comment and answer



                                                                                  -3 bytes from @Arnauld =D





                                                                                  _=>1024-eval(_.join`+`)/2


                                                                                  Try it online!






                                                                                  share|improve this answer











                                                                                  $endgroup$

















                                                                                    3












                                                                                    $begingroup$


                                                                                    JavaScript (Node.js), 25 bytes



                                                                                    Based on @Shaggys' comment and answer



                                                                                    -3 bytes from @Arnauld =D





                                                                                    _=>1024-eval(_.join`+`)/2


                                                                                    Try it online!






                                                                                    share|improve this answer











                                                                                    $endgroup$















                                                                                      3












                                                                                      3








                                                                                      3





                                                                                      $begingroup$


                                                                                      JavaScript (Node.js), 25 bytes



                                                                                      Based on @Shaggys' comment and answer



                                                                                      -3 bytes from @Arnauld =D





                                                                                      _=>1024-eval(_.join`+`)/2


                                                                                      Try it online!






                                                                                      share|improve this answer











                                                                                      $endgroup$




                                                                                      JavaScript (Node.js), 25 bytes



                                                                                      Based on @Shaggys' comment and answer



                                                                                      -3 bytes from @Arnauld =D





                                                                                      _=>1024-eval(_.join`+`)/2


                                                                                      Try it online!







                                                                                      share|improve this answer














                                                                                      share|improve this answer



                                                                                      share|improve this answer








                                                                                      edited Nov 12 '18 at 13:08

























                                                                                      answered Nov 12 '18 at 12:57









                                                                                      Luis felipe De jesus MunozLuis felipe De jesus Munoz

                                                                                      5,46821670




                                                                                      5,46821670





















                                                                                          2












                                                                                          $begingroup$


                                                                                          J, 10 bytes



                                                                                          2048-:@-+/


                                                                                          Try it online!



                                                                                          Alternative:




                                                                                          J, 10 bytes



                                                                                          1024-1#.-:


                                                                                          Try it online!






                                                                                          share|improve this answer











                                                                                          $endgroup$

















                                                                                            2












                                                                                            $begingroup$


                                                                                            J, 10 bytes



                                                                                            2048-:@-+/


                                                                                            Try it online!



                                                                                            Alternative:




                                                                                            J, 10 bytes



                                                                                            1024-1#.-:


                                                                                            Try it online!






                                                                                            share|improve this answer











                                                                                            $endgroup$















                                                                                              2












                                                                                              2








                                                                                              2





                                                                                              $begingroup$


                                                                                              J, 10 bytes



                                                                                              2048-:@-+/


                                                                                              Try it online!



                                                                                              Alternative:




                                                                                              J, 10 bytes



                                                                                              1024-1#.-:


                                                                                              Try it online!






                                                                                              share|improve this answer











                                                                                              $endgroup$




                                                                                              J, 10 bytes



                                                                                              2048-:@-+/


                                                                                              Try it online!



                                                                                              Alternative:




                                                                                              J, 10 bytes



                                                                                              1024-1#.-:


                                                                                              Try it online!







                                                                                              share|improve this answer














                                                                                              share|improve this answer



                                                                                              share|improve this answer








                                                                                              edited Nov 12 '18 at 13:39

























                                                                                              answered Nov 12 '18 at 13:29









                                                                                              Galen IvanovGalen Ivanov

                                                                                              6,91711034




                                                                                              6,91711034





















                                                                                                  2












                                                                                                  $begingroup$


                                                                                                  Ruby, 17 bytes





                                                                                                  ->l1024-l.sum/2


                                                                                                  Try it online!






                                                                                                  share|improve this answer









                                                                                                  $endgroup$

















                                                                                                    2












                                                                                                    $begingroup$


                                                                                                    Ruby, 17 bytes





                                                                                                    ->l1024-l.sum/2


                                                                                                    Try it online!






                                                                                                    share|improve this answer









                                                                                                    $endgroup$















                                                                                                      2












                                                                                                      2








                                                                                                      2





                                                                                                      $begingroup$


                                                                                                      Ruby, 17 bytes





                                                                                                      ->l1024-l.sum/2


                                                                                                      Try it online!






                                                                                                      share|improve this answer









                                                                                                      $endgroup$




                                                                                                      Ruby, 17 bytes





                                                                                                      ->l1024-l.sum/2


                                                                                                      Try it online!







                                                                                                      share|improve this answer












                                                                                                      share|improve this answer



                                                                                                      share|improve this answer










                                                                                                      answered Nov 12 '18 at 14:31









                                                                                                      G BG B

                                                                                                      7,8661329




                                                                                                      7,8661329





















                                                                                                          2












                                                                                                          $begingroup$

                                                                                                          TI-Basic, 8 bytes



                                                                                                          4^5-.5sum(Ans





                                                                                                          share|improve this answer









                                                                                                          $endgroup$

















                                                                                                            2












                                                                                                            $begingroup$

                                                                                                            TI-Basic, 8 bytes



                                                                                                            4^5-.5sum(Ans





                                                                                                            share|improve this answer









                                                                                                            $endgroup$















                                                                                                              2












                                                                                                              2








                                                                                                              2





                                                                                                              $begingroup$

                                                                                                              TI-Basic, 8 bytes



                                                                                                              4^5-.5sum(Ans





                                                                                                              share|improve this answer









                                                                                                              $endgroup$



                                                                                                              TI-Basic, 8 bytes



                                                                                                              4^5-.5sum(Ans






                                                                                                              share|improve this answer












                                                                                                              share|improve this answer



                                                                                                              share|improve this answer










                                                                                                              answered Nov 12 '18 at 17:20









                                                                                                              TimtechTimtech

                                                                                                              11.5k13760




                                                                                                              11.5k13760





















                                                                                                                  1












                                                                                                                  $begingroup$

                                                                                                                  JavaScript, 28 bytes



                                                                                                                  a=>a.map(n=>x-=n/2,x=1024)|x


                                                                                                                  Try it online






                                                                                                                  share|improve this answer









                                                                                                                  $endgroup$

















                                                                                                                    1












                                                                                                                    $begingroup$

                                                                                                                    JavaScript, 28 bytes



                                                                                                                    a=>a.map(n=>x-=n/2,x=1024)|x


                                                                                                                    Try it online






                                                                                                                    share|improve this answer









                                                                                                                    $endgroup$















                                                                                                                      1












                                                                                                                      1








                                                                                                                      1





                                                                                                                      $begingroup$

                                                                                                                      JavaScript, 28 bytes



                                                                                                                      a=>a.map(n=>x-=n/2,x=1024)|x


                                                                                                                      Try it online






                                                                                                                      share|improve this answer









                                                                                                                      $endgroup$



                                                                                                                      JavaScript, 28 bytes



                                                                                                                      a=>a.map(n=>x-=n/2,x=1024)|x


                                                                                                                      Try it online







                                                                                                                      share|improve this answer












                                                                                                                      share|improve this answer



                                                                                                                      share|improve this answer










                                                                                                                      answered Nov 12 '18 at 12:59









                                                                                                                      ShaggyShaggy

                                                                                                                      19.5k21667




                                                                                                                      19.5k21667





















                                                                                                                          1












                                                                                                                          $begingroup$


                                                                                                                          Jelly, 7 6 bytes



                                                                                                                          HSạ⁽¡ç


                                                                                                                          Try it online!



                                                                                                                          Explanation:



                                                                                                                          HSạ⁽¡ç Example input: [4,16,64]
                                                                                                                          H Halve input. [2, 8, 32]
                                                                                                                          S Sum. 42
                                                                                                                          ⁽¡ç Number 1024.
                                                                                                                          ạ Difference. 982


                                                                                                                          -1 byte by using a base-250 number






                                                                                                                          share|improve this answer











                                                                                                                          $endgroup$

















                                                                                                                            1












                                                                                                                            $begingroup$


                                                                                                                            Jelly, 7 6 bytes



                                                                                                                            HSạ⁽¡ç


                                                                                                                            Try it online!



                                                                                                                            Explanation:



                                                                                                                            HSạ⁽¡ç Example input: [4,16,64]
                                                                                                                            H Halve input. [2, 8, 32]
                                                                                                                            S Sum. 42
                                                                                                                            ⁽¡ç Number 1024.
                                                                                                                            ạ Difference. 982


                                                                                                                            -1 byte by using a base-250 number






                                                                                                                            share|improve this answer











                                                                                                                            $endgroup$















                                                                                                                              1












                                                                                                                              1








                                                                                                                              1





                                                                                                                              $begingroup$


                                                                                                                              Jelly, 7 6 bytes



                                                                                                                              HSạ⁽¡ç


                                                                                                                              Try it online!



                                                                                                                              Explanation:



                                                                                                                              HSạ⁽¡ç Example input: [4,16,64]
                                                                                                                              H Halve input. [2, 8, 32]
                                                                                                                              S Sum. 42
                                                                                                                              ⁽¡ç Number 1024.
                                                                                                                              ạ Difference. 982


                                                                                                                              -1 byte by using a base-250 number






                                                                                                                              share|improve this answer











                                                                                                                              $endgroup$




                                                                                                                              Jelly, 7 6 bytes



                                                                                                                              HSạ⁽¡ç


                                                                                                                              Try it online!



                                                                                                                              Explanation:



                                                                                                                              HSạ⁽¡ç Example input: [4,16,64]
                                                                                                                              H Halve input. [2, 8, 32]
                                                                                                                              S Sum. 42
                                                                                                                              ⁽¡ç Number 1024.
                                                                                                                              ạ Difference. 982


                                                                                                                              -1 byte by using a base-250 number







                                                                                                                              share|improve this answer














                                                                                                                              share|improve this answer



                                                                                                                              share|improve this answer








                                                                                                                              edited Nov 12 '18 at 14:21

























                                                                                                                              answered Nov 12 '18 at 13:54









                                                                                                                              Comrade SparklePonyComrade SparklePony

                                                                                                                              3,43611554




                                                                                                                              3,43611554





















                                                                                                                                  1












                                                                                                                                  $begingroup$


                                                                                                                                  Catholicon, 5 bytes



                                                                                                                                  -`L̇½Ṗ


                                                                                                                                  Explanation:



                                                                                                                                  - subtract
                                                                                                                                  `L̇ 1024
                                                                                                                                  from
                                                                                                                                  ½ half of the
                                                                                                                                  Ṗ sum [of the input]





                                                                                                                                  share|improve this answer









                                                                                                                                  $endgroup$








                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    Is that a new golfing language I smell? :)
                                                                                                                                    $endgroup$
                                                                                                                                    – ETHproductions
                                                                                                                                    Nov 12 '18 at 21:37






                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    +1 for the new language. Another one to learn </sigh>
                                                                                                                                    $endgroup$
                                                                                                                                    – ElPedro
                                                                                                                                    Nov 12 '18 at 22:10















                                                                                                                                  1












                                                                                                                                  $begingroup$


                                                                                                                                  Catholicon, 5 bytes



                                                                                                                                  -`L̇½Ṗ


                                                                                                                                  Explanation:



                                                                                                                                  - subtract
                                                                                                                                  `L̇ 1024
                                                                                                                                  from
                                                                                                                                  ½ half of the
                                                                                                                                  Ṗ sum [of the input]





                                                                                                                                  share|improve this answer









                                                                                                                                  $endgroup$








                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    Is that a new golfing language I smell? :)
                                                                                                                                    $endgroup$
                                                                                                                                    – ETHproductions
                                                                                                                                    Nov 12 '18 at 21:37






                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    +1 for the new language. Another one to learn </sigh>
                                                                                                                                    $endgroup$
                                                                                                                                    – ElPedro
                                                                                                                                    Nov 12 '18 at 22:10













                                                                                                                                  1












                                                                                                                                  1








                                                                                                                                  1





                                                                                                                                  $begingroup$


                                                                                                                                  Catholicon, 5 bytes



                                                                                                                                  -`L̇½Ṗ


                                                                                                                                  Explanation:



                                                                                                                                  - subtract
                                                                                                                                  `L̇ 1024
                                                                                                                                  from
                                                                                                                                  ½ half of the
                                                                                                                                  Ṗ sum [of the input]





                                                                                                                                  share|improve this answer









                                                                                                                                  $endgroup$




                                                                                                                                  Catholicon, 5 bytes



                                                                                                                                  -`L̇½Ṗ


                                                                                                                                  Explanation:



                                                                                                                                  - subtract
                                                                                                                                  `L̇ 1024
                                                                                                                                  from
                                                                                                                                  ½ half of the
                                                                                                                                  Ṗ sum [of the input]






                                                                                                                                  share|improve this answer












                                                                                                                                  share|improve this answer



                                                                                                                                  share|improve this answer










                                                                                                                                  answered Nov 12 '18 at 15:42









                                                                                                                                  OkxOkx

                                                                                                                                  12.9k128102




                                                                                                                                  12.9k128102







                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    Is that a new golfing language I smell? :)
                                                                                                                                    $endgroup$
                                                                                                                                    – ETHproductions
                                                                                                                                    Nov 12 '18 at 21:37






                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    +1 for the new language. Another one to learn </sigh>
                                                                                                                                    $endgroup$
                                                                                                                                    – ElPedro
                                                                                                                                    Nov 12 '18 at 22:10












                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    Is that a new golfing language I smell? :)
                                                                                                                                    $endgroup$
                                                                                                                                    – ETHproductions
                                                                                                                                    Nov 12 '18 at 21:37






                                                                                                                                  • 1




                                                                                                                                    $begingroup$
                                                                                                                                    +1 for the new language. Another one to learn </sigh>
                                                                                                                                    $endgroup$
                                                                                                                                    – ElPedro
                                                                                                                                    Nov 12 '18 at 22:10







                                                                                                                                  1




                                                                                                                                  1




                                                                                                                                  $begingroup$
                                                                                                                                  Is that a new golfing language I smell? :)
                                                                                                                                  $endgroup$
                                                                                                                                  – ETHproductions
                                                                                                                                  Nov 12 '18 at 21:37




                                                                                                                                  $begingroup$
                                                                                                                                  Is that a new golfing language I smell? :)
                                                                                                                                  $endgroup$
                                                                                                                                  – ETHproductions
                                                                                                                                  Nov 12 '18 at 21:37




                                                                                                                                  1




                                                                                                                                  1




                                                                                                                                  $begingroup$
                                                                                                                                  +1 for the new language. Another one to learn </sigh>
                                                                                                                                  $endgroup$
                                                                                                                                  – ElPedro
                                                                                                                                  Nov 12 '18 at 22:10




                                                                                                                                  $begingroup$
                                                                                                                                  +1 for the new language. Another one to learn </sigh>
                                                                                                                                  $endgroup$
                                                                                                                                  – ElPedro
                                                                                                                                  Nov 12 '18 at 22:10











                                                                                                                                  1












                                                                                                                                  $begingroup$

                                                                                                                                  Japt, 7 6 bytes



                                                                                                                                  xz nH²


                                                                                                                                  Try it or verify all test cases



                                                                                                                                   z :(Floor) divide each by 2
                                                                                                                                  x :Reduce by addition
                                                                                                                                  n :Subtract from
                                                                                                                                  H : 32
                                                                                                                                  ² : Squared





                                                                                                                                  share|improve this answer











                                                                                                                                  $endgroup$

















                                                                                                                                    1












                                                                                                                                    $begingroup$

                                                                                                                                    Japt, 7 6 bytes



                                                                                                                                    xz nH²


                                                                                                                                    Try it or verify all test cases



                                                                                                                                     z :(Floor) divide each by 2
                                                                                                                                    x :Reduce by addition
                                                                                                                                    n :Subtract from
                                                                                                                                    H : 32
                                                                                                                                    ² : Squared





                                                                                                                                    share|improve this answer











                                                                                                                                    $endgroup$















                                                                                                                                      1












                                                                                                                                      1








                                                                                                                                      1





                                                                                                                                      $begingroup$

                                                                                                                                      Japt, 7 6 bytes



                                                                                                                                      xz nH²


                                                                                                                                      Try it or verify all test cases



                                                                                                                                       z :(Floor) divide each by 2
                                                                                                                                      x :Reduce by addition
                                                                                                                                      n :Subtract from
                                                                                                                                      H : 32
                                                                                                                                      ² : Squared





                                                                                                                                      share|improve this answer











                                                                                                                                      $endgroup$



                                                                                                                                      Japt, 7 6 bytes



                                                                                                                                      xz nH²


                                                                                                                                      Try it or verify all test cases



                                                                                                                                       z :(Floor) divide each by 2
                                                                                                                                      x :Reduce by addition
                                                                                                                                      n :Subtract from
                                                                                                                                      H : 32
                                                                                                                                      ² : Squared






                                                                                                                                      share|improve this answer














                                                                                                                                      share|improve this answer



                                                                                                                                      share|improve this answer








                                                                                                                                      edited Nov 12 '18 at 17:38

























                                                                                                                                      answered Nov 12 '18 at 12:49









                                                                                                                                      ShaggyShaggy

                                                                                                                                      19.5k21667




                                                                                                                                      19.5k21667





















                                                                                                                                          1












                                                                                                                                          $begingroup$

                                                                                                                                          perl -aE, 27 bytes



                                                                                                                                          $"=$:;say eval"(2048-@F)/2"


                                                                                                                                          This reads a line with numbers (whitespace separated) from STDIN, and writes the answer to STDOUT.



                                                                                                                                          What it does is subtract all the numbers from the input from 2048, and it divides the remainder by 2. The -a switch puts the in the array @F (one number per element). If we interpolate an array into a string (which is what we are doing here), perl puts the value of $" between the elements. The little used variable $: is be default n-; and since white space between tokens is ignored, the result is subtracting all the numbers from 2048. The eval does the calculation.






                                                                                                                                          share|improve this answer









                                                                                                                                          $endgroup$

















                                                                                                                                            1












                                                                                                                                            $begingroup$

                                                                                                                                            perl -aE, 27 bytes



                                                                                                                                            $"=$:;say eval"(2048-@F)/2"


                                                                                                                                            This reads a line with numbers (whitespace separated) from STDIN, and writes the answer to STDOUT.



                                                                                                                                            What it does is subtract all the numbers from the input from 2048, and it divides the remainder by 2. The -a switch puts the in the array @F (one number per element). If we interpolate an array into a string (which is what we are doing here), perl puts the value of $" between the elements. The little used variable $: is be default n-; and since white space between tokens is ignored, the result is subtracting all the numbers from 2048. The eval does the calculation.






                                                                                                                                            share|improve this answer









                                                                                                                                            $endgroup$















                                                                                                                                              1












                                                                                                                                              1








                                                                                                                                              1





                                                                                                                                              $begingroup$

                                                                                                                                              perl -aE, 27 bytes



                                                                                                                                              $"=$:;say eval"(2048-@F)/2"


                                                                                                                                              This reads a line with numbers (whitespace separated) from STDIN, and writes the answer to STDOUT.



                                                                                                                                              What it does is subtract all the numbers from the input from 2048, and it divides the remainder by 2. The -a switch puts the in the array @F (one number per element). If we interpolate an array into a string (which is what we are doing here), perl puts the value of $" between the elements. The little used variable $: is be default n-; and since white space between tokens is ignored, the result is subtracting all the numbers from 2048. The eval does the calculation.






                                                                                                                                              share|improve this answer









                                                                                                                                              $endgroup$



                                                                                                                                              perl -aE, 27 bytes



                                                                                                                                              $"=$:;say eval"(2048-@F)/2"


                                                                                                                                              This reads a line with numbers (whitespace separated) from STDIN, and writes the answer to STDOUT.



                                                                                                                                              What it does is subtract all the numbers from the input from 2048, and it divides the remainder by 2. The -a switch puts the in the array @F (one number per element). If we interpolate an array into a string (which is what we are doing here), perl puts the value of $" between the elements. The little used variable $: is be default n-; and since white space between tokens is ignored, the result is subtracting all the numbers from 2048. The eval does the calculation.







                                                                                                                                              share|improve this answer












                                                                                                                                              share|improve this answer



                                                                                                                                              share|improve this answer










                                                                                                                                              answered Nov 12 '18 at 20:57









                                                                                                                                              AbigailAbigail

                                                                                                                                              44617




                                                                                                                                              44617





















                                                                                                                                                  0












                                                                                                                                                  $begingroup$


                                                                                                                                                  JavaScript (Node.js), 33 bytes





                                                                                                                                                  a=>!a.map(n=>x-=n/2,x=1024)>x?0:x


                                                                                                                                                  Try it online!



                                                                                                                                                  Why you don't do on [1024,1024,1024]?






                                                                                                                                                  share|improve this answer









                                                                                                                                                  $endgroup$

















                                                                                                                                                    0












                                                                                                                                                    $begingroup$


                                                                                                                                                    JavaScript (Node.js), 33 bytes





                                                                                                                                                    a=>!a.map(n=>x-=n/2,x=1024)>x?0:x


                                                                                                                                                    Try it online!



                                                                                                                                                    Why you don't do on [1024,1024,1024]?






                                                                                                                                                    share|improve this answer









                                                                                                                                                    $endgroup$















                                                                                                                                                      0












                                                                                                                                                      0








                                                                                                                                                      0





                                                                                                                                                      $begingroup$


                                                                                                                                                      JavaScript (Node.js), 33 bytes





                                                                                                                                                      a=>!a.map(n=>x-=n/2,x=1024)>x?0:x


                                                                                                                                                      Try it online!



                                                                                                                                                      Why you don't do on [1024,1024,1024]?






                                                                                                                                                      share|improve this answer









                                                                                                                                                      $endgroup$




                                                                                                                                                      JavaScript (Node.js), 33 bytes





                                                                                                                                                      a=>!a.map(n=>x-=n/2,x=1024)>x?0:x


                                                                                                                                                      Try it online!



                                                                                                                                                      Why you don't do on [1024,1024,1024]?







                                                                                                                                                      share|improve this answer












                                                                                                                                                      share|improve this answer



                                                                                                                                                      share|improve this answer










                                                                                                                                                      answered Nov 12 '18 at 13:05









                                                                                                                                                      l4m2l4m2

                                                                                                                                                      4,7661835




                                                                                                                                                      4,7661835





















                                                                                                                                                          0












                                                                                                                                                          $begingroup$


                                                                                                                                                          R, 17 bytes





                                                                                                                                                          4^5-sum(scan())/2


                                                                                                                                                          Try it online!






                                                                                                                                                          share|improve this answer









                                                                                                                                                          $endgroup$

















                                                                                                                                                            0












                                                                                                                                                            $begingroup$


                                                                                                                                                            R, 17 bytes





                                                                                                                                                            4^5-sum(scan())/2


                                                                                                                                                            Try it online!






                                                                                                                                                            share|improve this answer









                                                                                                                                                            $endgroup$















                                                                                                                                                              0












                                                                                                                                                              0








                                                                                                                                                              0





                                                                                                                                                              $begingroup$


                                                                                                                                                              R, 17 bytes





                                                                                                                                                              4^5-sum(scan())/2


                                                                                                                                                              Try it online!






                                                                                                                                                              share|improve this answer









                                                                                                                                                              $endgroup$




                                                                                                                                                              R, 17 bytes





                                                                                                                                                              4^5-sum(scan())/2


                                                                                                                                                              Try it online!







                                                                                                                                                              share|improve this answer












                                                                                                                                                              share|improve this answer



                                                                                                                                                              share|improve this answer










                                                                                                                                                              answered Nov 12 '18 at 14:25









                                                                                                                                                              ngmngm

                                                                                                                                                              3,36924




                                                                                                                                                              3,36924





















                                                                                                                                                                  0












                                                                                                                                                                  $begingroup$


                                                                                                                                                                  TeaScript, 11 bytes





                                                                                                                                                                  4p5)-(xx)/2


                                                                                                                                                                  Try it online!






                                                                                                                                                                  share|improve this answer









                                                                                                                                                                  $endgroup$

















                                                                                                                                                                    0












                                                                                                                                                                    $begingroup$


                                                                                                                                                                    TeaScript, 11 bytes





                                                                                                                                                                    4p5)-(xx)/2


                                                                                                                                                                    Try it online!






                                                                                                                                                                    share|improve this answer









                                                                                                                                                                    $endgroup$















                                                                                                                                                                      0












                                                                                                                                                                      0








                                                                                                                                                                      0





                                                                                                                                                                      $begingroup$


                                                                                                                                                                      TeaScript, 11 bytes





                                                                                                                                                                      4p5)-(xx)/2


                                                                                                                                                                      Try it online!






                                                                                                                                                                      share|improve this answer









                                                                                                                                                                      $endgroup$




                                                                                                                                                                      TeaScript, 11 bytes





                                                                                                                                                                      4p5)-(xx)/2


                                                                                                                                                                      Try it online!







                                                                                                                                                                      share|improve this answer












                                                                                                                                                                      share|improve this answer



                                                                                                                                                                      share|improve this answer










                                                                                                                                                                      answered Nov 12 '18 at 18:03









                                                                                                                                                                      Luis felipe De jesus MunozLuis felipe De jesus Munoz

                                                                                                                                                                      5,46821670




                                                                                                                                                                      5,46821670





















                                                                                                                                                                          0












                                                                                                                                                                          $begingroup$


                                                                                                                                                                          Stax, 6 bytes



                                                                                                                                                                          ë3i─♠÷


                                                                                                                                                                          Run and debug it






                                                                                                                                                                          share|improve this answer









                                                                                                                                                                          $endgroup$

















                                                                                                                                                                            0












                                                                                                                                                                            $begingroup$


                                                                                                                                                                            Stax, 6 bytes



                                                                                                                                                                            ë3i─♠÷


                                                                                                                                                                            Run and debug it






                                                                                                                                                                            share|improve this answer









                                                                                                                                                                            $endgroup$















                                                                                                                                                                              0












                                                                                                                                                                              0








                                                                                                                                                                              0





                                                                                                                                                                              $begingroup$


                                                                                                                                                                              Stax, 6 bytes



                                                                                                                                                                              ë3i─♠÷


                                                                                                                                                                              Run and debug it






                                                                                                                                                                              share|improve this answer









                                                                                                                                                                              $endgroup$




                                                                                                                                                                              Stax, 6 bytes



                                                                                                                                                                              ë3i─♠÷


                                                                                                                                                                              Run and debug it







                                                                                                                                                                              share|improve this answer












                                                                                                                                                                              share|improve this answer



                                                                                                                                                                              share|improve this answer










                                                                                                                                                                              answered Nov 12 '18 at 18:34









                                                                                                                                                                              recursiverecursive

                                                                                                                                                                              5,4091322




                                                                                                                                                                              5,4091322





















                                                                                                                                                                                  0












                                                                                                                                                                                  $begingroup$


                                                                                                                                                                                  Perl 6, 12 bytes





                                                                                                                                                                                  1024-*.sum/2


                                                                                                                                                                                  Try it online!



                                                                                                                                                                                  Anonymous Whatever lambda that takes a list and returns a number.






                                                                                                                                                                                  share|improve this answer









                                                                                                                                                                                  $endgroup$

















                                                                                                                                                                                    0












                                                                                                                                                                                    $begingroup$


                                                                                                                                                                                    Perl 6, 12 bytes





                                                                                                                                                                                    1024-*.sum/2


                                                                                                                                                                                    Try it online!



                                                                                                                                                                                    Anonymous Whatever lambda that takes a list and returns a number.






                                                                                                                                                                                    share|improve this answer









                                                                                                                                                                                    $endgroup$















                                                                                                                                                                                      0












                                                                                                                                                                                      0








                                                                                                                                                                                      0





                                                                                                                                                                                      $begingroup$


                                                                                                                                                                                      Perl 6, 12 bytes





                                                                                                                                                                                      1024-*.sum/2


                                                                                                                                                                                      Try it online!



                                                                                                                                                                                      Anonymous Whatever lambda that takes a list and returns a number.






                                                                                                                                                                                      share|improve this answer









                                                                                                                                                                                      $endgroup$




                                                                                                                                                                                      Perl 6, 12 bytes





                                                                                                                                                                                      1024-*.sum/2


                                                                                                                                                                                      Try it online!



                                                                                                                                                                                      Anonymous Whatever lambda that takes a list and returns a number.







                                                                                                                                                                                      share|improve this answer












                                                                                                                                                                                      share|improve this answer



                                                                                                                                                                                      share|improve this answer










                                                                                                                                                                                      answered Nov 12 '18 at 22:38









                                                                                                                                                                                      Jo KingJo King

                                                                                                                                                                                      24.2k357124




                                                                                                                                                                                      24.2k357124





















                                                                                                                                                                                          0












                                                                                                                                                                                          $begingroup$

                                                                                                                                                                                          AWK, 26 bytes



                                                                                                                                                                                          s+=$1ENDprint 1024-s/2


                                                                                                                                                                                          Input numbers are separated by newlines (i.e. one per line)






                                                                                                                                                                                          share|improve this answer









                                                                                                                                                                                          $endgroup$

















                                                                                                                                                                                            0












                                                                                                                                                                                            $begingroup$

                                                                                                                                                                                            AWK, 26 bytes



                                                                                                                                                                                            s+=$1ENDprint 1024-s/2


                                                                                                                                                                                            Input numbers are separated by newlines (i.e. one per line)






                                                                                                                                                                                            share|improve this answer









                                                                                                                                                                                            $endgroup$















                                                                                                                                                                                              0












                                                                                                                                                                                              0








                                                                                                                                                                                              0





                                                                                                                                                                                              $begingroup$

                                                                                                                                                                                              AWK, 26 bytes



                                                                                                                                                                                              s+=$1ENDprint 1024-s/2


                                                                                                                                                                                              Input numbers are separated by newlines (i.e. one per line)






                                                                                                                                                                                              share|improve this answer









                                                                                                                                                                                              $endgroup$



                                                                                                                                                                                              AWK, 26 bytes



                                                                                                                                                                                              s+=$1ENDprint 1024-s/2


                                                                                                                                                                                              Input numbers are separated by newlines (i.e. one per line)







                                                                                                                                                                                              share|improve this answer












                                                                                                                                                                                              share|improve this answer



                                                                                                                                                                                              share|improve this answer










                                                                                                                                                                                              answered Nov 13 '18 at 12:53









                                                                                                                                                                                              iBug .........................iBug .........................

                                                                                                                                                                                              1,377731




                                                                                                                                                                                              1,377731





















                                                                                                                                                                                                  0












                                                                                                                                                                                                  $begingroup$

                                                                                                                                                                                                  Neim, 6 bytes



                                                                                                                                                                                                  Pretty new to Neim but got it working



                                                                                                                                                                                                  𝐬ᚺςᚫᛦ𝕤


                                                                                                                                                                                                  Explanation:



                                                                                                                                                                                                   𝐬 : Sum input
                                                                                                                                                                                                  ᚺ : Divide by 2 (stack now [input summed and divided by 2])
                                                                                                                                                                                                  ς : Variable set to 16 pushed to stack
                                                                                                                                                                                                  ᚫ : Multiply by 2
                                                                                                                                                                                                  ᛦ : Square (stack now [input summed and divided by 2, 1024])
                                                                                                                                                                                                  𝕤 : Subtract then absolute


                                                                                                                                                                                                  Try it online!






                                                                                                                                                                                                  share|improve this answer









                                                                                                                                                                                                  $endgroup$

















                                                                                                                                                                                                    0












                                                                                                                                                                                                    $begingroup$

                                                                                                                                                                                                    Neim, 6 bytes



                                                                                                                                                                                                    Pretty new to Neim but got it working



                                                                                                                                                                                                    𝐬ᚺςᚫᛦ𝕤


                                                                                                                                                                                                    Explanation:



                                                                                                                                                                                                     𝐬 : Sum input
                                                                                                                                                                                                    ᚺ : Divide by 2 (stack now [input summed and divided by 2])
                                                                                                                                                                                                    ς : Variable set to 16 pushed to stack
                                                                                                                                                                                                    ᚫ : Multiply by 2
                                                                                                                                                                                                    ᛦ : Square (stack now [input summed and divided by 2, 1024])
                                                                                                                                                                                                    𝕤 : Subtract then absolute


                                                                                                                                                                                                    Try it online!






                                                                                                                                                                                                    share|improve this answer









                                                                                                                                                                                                    $endgroup$















                                                                                                                                                                                                      0












                                                                                                                                                                                                      0








                                                                                                                                                                                                      0





                                                                                                                                                                                                      $begingroup$

                                                                                                                                                                                                      Neim, 6 bytes



                                                                                                                                                                                                      Pretty new to Neim but got it working



                                                                                                                                                                                                      𝐬ᚺςᚫᛦ𝕤


                                                                                                                                                                                                      Explanation:



                                                                                                                                                                                                       𝐬 : Sum input
                                                                                                                                                                                                      ᚺ : Divide by 2 (stack now [input summed and divided by 2])
                                                                                                                                                                                                      ς : Variable set to 16 pushed to stack
                                                                                                                                                                                                      ᚫ : Multiply by 2
                                                                                                                                                                                                      ᛦ : Square (stack now [input summed and divided by 2, 1024])
                                                                                                                                                                                                      𝕤 : Subtract then absolute


                                                                                                                                                                                                      Try it online!






                                                                                                                                                                                                      share|improve this answer









                                                                                                                                                                                                      $endgroup$



                                                                                                                                                                                                      Neim, 6 bytes



                                                                                                                                                                                                      Pretty new to Neim but got it working



                                                                                                                                                                                                      𝐬ᚺςᚫᛦ𝕤


                                                                                                                                                                                                      Explanation:



                                                                                                                                                                                                       𝐬 : Sum input
                                                                                                                                                                                                      ᚺ : Divide by 2 (stack now [input summed and divided by 2])
                                                                                                                                                                                                      ς : Variable set to 16 pushed to stack
                                                                                                                                                                                                      ᚫ : Multiply by 2
                                                                                                                                                                                                      ᛦ : Square (stack now [input summed and divided by 2, 1024])
                                                                                                                                                                                                      𝕤 : Subtract then absolute


                                                                                                                                                                                                      Try it online!







                                                                                                                                                                                                      share|improve this answer












                                                                                                                                                                                                      share|improve this answer



                                                                                                                                                                                                      share|improve this answer










                                                                                                                                                                                                      answered Nov 13 '18 at 14:39









                                                                                                                                                                                                      LiefdeWenLiefdeWen

                                                                                                                                                                                                      2,512936




                                                                                                                                                                                                      2,512936





















                                                                                                                                                                                                          0












                                                                                                                                                                                                          $begingroup$

                                                                                                                                                                                                          JAVA, 30 bytes



                                                                                                                                                                                                          2048-IntStream.of(a).sum()/2;





                                                                                                                                                                                                          share|improve this answer









                                                                                                                                                                                                          $endgroup$

















                                                                                                                                                                                                            0












                                                                                                                                                                                                            $begingroup$

                                                                                                                                                                                                            JAVA, 30 bytes



                                                                                                                                                                                                            2048-IntStream.of(a).sum()/2;





                                                                                                                                                                                                            share|improve this answer









                                                                                                                                                                                                            $endgroup$















                                                                                                                                                                                                              0












                                                                                                                                                                                                              0








                                                                                                                                                                                                              0





                                                                                                                                                                                                              $begingroup$

                                                                                                                                                                                                              JAVA, 30 bytes



                                                                                                                                                                                                              2048-IntStream.of(a).sum()/2;





                                                                                                                                                                                                              share|improve this answer









                                                                                                                                                                                                              $endgroup$



                                                                                                                                                                                                              JAVA, 30 bytes



                                                                                                                                                                                                              2048-IntStream.of(a).sum()/2;






                                                                                                                                                                                                              share|improve this answer












                                                                                                                                                                                                              share|improve this answer



                                                                                                                                                                                                              share|improve this answer










                                                                                                                                                                                                              answered Nov 13 '18 at 15:49









                                                                                                                                                                                                              isaaceisaace

                                                                                                                                                                                                              1714




                                                                                                                                                                                                              1714





















                                                                                                                                                                                                                  0












                                                                                                                                                                                                                  $begingroup$


                                                                                                                                                                                                                  RAD, 10 bytes



                                                                                                                                                                                                                  1024-+/ω÷2


                                                                                                                                                                                                                  Try it online!






                                                                                                                                                                                                                  share|improve this answer









                                                                                                                                                                                                                  $endgroup$

















                                                                                                                                                                                                                    0












                                                                                                                                                                                                                    $begingroup$


                                                                                                                                                                                                                    RAD, 10 bytes



                                                                                                                                                                                                                    1024-+/ω÷2


                                                                                                                                                                                                                    Try it online!






                                                                                                                                                                                                                    share|improve this answer









                                                                                                                                                                                                                    $endgroup$















                                                                                                                                                                                                                      0












                                                                                                                                                                                                                      0








                                                                                                                                                                                                                      0





                                                                                                                                                                                                                      $begingroup$


                                                                                                                                                                                                                      RAD, 10 bytes



                                                                                                                                                                                                                      1024-+/ω÷2


                                                                                                                                                                                                                      Try it online!






                                                                                                                                                                                                                      share|improve this answer









                                                                                                                                                                                                                      $endgroup$




                                                                                                                                                                                                                      RAD, 10 bytes



                                                                                                                                                                                                                      1024-+/ω÷2


                                                                                                                                                                                                                      Try it online!







                                                                                                                                                                                                                      share|improve this answer












                                                                                                                                                                                                                      share|improve this answer



                                                                                                                                                                                                                      share|improve this answer










                                                                                                                                                                                                                      answered Nov 13 '18 at 15:59









                                                                                                                                                                                                                      ZacharýZacharý

                                                                                                                                                                                                                      5,22511035




                                                                                                                                                                                                                      5,22511035





















                                                                                                                                                                                                                          0












                                                                                                                                                                                                                          $begingroup$


                                                                                                                                                                                                                          Clojure, 24 bytes





                                                                                                                                                                                                                          #(- 1024(/(apply + %)2))


                                                                                                                                                                                                                          Try it online!






                                                                                                                                                                                                                          share|improve this answer









                                                                                                                                                                                                                          $endgroup$

















                                                                                                                                                                                                                            0












                                                                                                                                                                                                                            $begingroup$


                                                                                                                                                                                                                            Clojure, 24 bytes





                                                                                                                                                                                                                            #(- 1024(/(apply + %)2))


                                                                                                                                                                                                                            Try it online!






                                                                                                                                                                                                                            share|improve this answer









                                                                                                                                                                                                                            $endgroup$















                                                                                                                                                                                                                              0












                                                                                                                                                                                                                              0








                                                                                                                                                                                                                              0





                                                                                                                                                                                                                              $begingroup$


                                                                                                                                                                                                                              Clojure, 24 bytes





                                                                                                                                                                                                                              #(- 1024(/(apply + %)2))


                                                                                                                                                                                                                              Try it online!






                                                                                                                                                                                                                              share|improve this answer









                                                                                                                                                                                                                              $endgroup$




                                                                                                                                                                                                                              Clojure, 24 bytes





                                                                                                                                                                                                                              #(- 1024(/(apply + %)2))


                                                                                                                                                                                                                              Try it online!







                                                                                                                                                                                                                              share|improve this answer












                                                                                                                                                                                                                              share|improve this answer



                                                                                                                                                                                                                              share|improve this answer










                                                                                                                                                                                                                              answered Nov 24 '18 at 2:33









                                                                                                                                                                                                                              TheGreatGeekTheGreatGeek

                                                                                                                                                                                                                              814




                                                                                                                                                                                                                              814





















                                                                                                                                                                                                                                  0












                                                                                                                                                                                                                                  $begingroup$


                                                                                                                                                                                                                                  Haskell, 16 bytes





                                                                                                                                                                                                                                  (1024-).(/2).sum


                                                                                                                                                                                                                                  An anonymous function, takes a list and returns a float.



                                                                                                                                                                                                                                  Try it online!






                                                                                                                                                                                                                                  share|improve this answer









                                                                                                                                                                                                                                  $endgroup$

















                                                                                                                                                                                                                                    0












                                                                                                                                                                                                                                    $begingroup$


                                                                                                                                                                                                                                    Haskell, 16 bytes





                                                                                                                                                                                                                                    (1024-).(/2).sum


                                                                                                                                                                                                                                    An anonymous function, takes a list and returns a float.



                                                                                                                                                                                                                                    Try it online!






                                                                                                                                                                                                                                    share|improve this answer









                                                                                                                                                                                                                                    $endgroup$















                                                                                                                                                                                                                                      0












                                                                                                                                                                                                                                      0








                                                                                                                                                                                                                                      0





                                                                                                                                                                                                                                      $begingroup$


                                                                                                                                                                                                                                      Haskell, 16 bytes





                                                                                                                                                                                                                                      (1024-).(/2).sum


                                                                                                                                                                                                                                      An anonymous function, takes a list and returns a float.



                                                                                                                                                                                                                                      Try it online!






                                                                                                                                                                                                                                      share|improve this answer









                                                                                                                                                                                                                                      $endgroup$




                                                                                                                                                                                                                                      Haskell, 16 bytes





                                                                                                                                                                                                                                      (1024-).(/2).sum


                                                                                                                                                                                                                                      An anonymous function, takes a list and returns a float.



                                                                                                                                                                                                                                      Try it online!







                                                                                                                                                                                                                                      share|improve this answer












                                                                                                                                                                                                                                      share|improve this answer



                                                                                                                                                                                                                                      share|improve this answer










                                                                                                                                                                                                                                      answered Nov 24 '18 at 3:28









                                                                                                                                                                                                                                      LyricLyLyricLy

                                                                                                                                                                                                                                      2,4131935




                                                                                                                                                                                                                                      2,4131935





















                                                                                                                                                                                                                                          0












                                                                                                                                                                                                                                          $begingroup$

                                                                                                                                                                                                                                          F#, 24 bytes



                                                                                                                                                                                                                                          fun f->1024-List.sum f/2


                                                                                                                                                                                                                                          1024 minus the sum divided by 2.






                                                                                                                                                                                                                                          share|improve this answer









                                                                                                                                                                                                                                          $endgroup$

















                                                                                                                                                                                                                                            0












                                                                                                                                                                                                                                            $begingroup$

                                                                                                                                                                                                                                            F#, 24 bytes



                                                                                                                                                                                                                                            fun f->1024-List.sum f/2


                                                                                                                                                                                                                                            1024 minus the sum divided by 2.






                                                                                                                                                                                                                                            share|improve this answer









                                                                                                                                                                                                                                            $endgroup$















                                                                                                                                                                                                                                              0












                                                                                                                                                                                                                                              0








                                                                                                                                                                                                                                              0





                                                                                                                                                                                                                                              $begingroup$

                                                                                                                                                                                                                                              F#, 24 bytes



                                                                                                                                                                                                                                              fun f->1024-List.sum f/2


                                                                                                                                                                                                                                              1024 minus the sum divided by 2.






                                                                                                                                                                                                                                              share|improve this answer









                                                                                                                                                                                                                                              $endgroup$



                                                                                                                                                                                                                                              F#, 24 bytes



                                                                                                                                                                                                                                              fun f->1024-List.sum f/2


                                                                                                                                                                                                                                              1024 minus the sum divided by 2.







                                                                                                                                                                                                                                              share|improve this answer












                                                                                                                                                                                                                                              share|improve this answer



                                                                                                                                                                                                                                              share|improve this answer










                                                                                                                                                                                                                                              answered Nov 28 '18 at 5:35









                                                                                                                                                                                                                                              Embodiment of IgnoranceEmbodiment of Ignorance

                                                                                                                                                                                                                                              1,438123




                                                                                                                                                                                                                                              1,438123



























                                                                                                                                                                                                                                                  draft saved

                                                                                                                                                                                                                                                  draft discarded
















































                                                                                                                                                                                                                                                  If this is an answer to a challenge…



                                                                                                                                                                                                                                                  • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                                                                                                                                                                                                                  • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                                                                                                                                                                                                    Explanations of your answer make it more interesting to read and are very much encouraged.


                                                                                                                                                                                                                                                  • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                                                                                                                                                                                                                                  More generally…



                                                                                                                                                                                                                                                  • …Please make sure to answer the question and provide sufficient detail.


                                                                                                                                                                                                                                                  • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                                                                                                                                                                                                                                  draft saved


                                                                                                                                                                                                                                                  draft discarded














                                                                                                                                                                                                                                                  StackExchange.ready(
                                                                                                                                                                                                                                                  function ()
                                                                                                                                                                                                                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f175765%2fcouch-2048-how-much-more-till-2048%23new-answer', 'question_page');

                                                                                                                                                                                                                                                  );

                                                                                                                                                                                                                                                  Post as a guest















                                                                                                                                                                                                                                                  Required, but never shown





















































                                                                                                                                                                                                                                                  Required, but never shown














                                                                                                                                                                                                                                                  Required, but never shown












                                                                                                                                                                                                                                                  Required, but never shown







                                                                                                                                                                                                                                                  Required, but never shown

































                                                                                                                                                                                                                                                  Required, but never shown














                                                                                                                                                                                                                                                  Required, but never shown












                                                                                                                                                                                                                                                  Required, but never shown







                                                                                                                                                                                                                                                  Required, but never shown







                                                                                                                                                                                                                                                  Popular posts from this blog

                                                                                                                                                                                                                                                  𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

                                                                                                                                                                                                                                                  Crossroads (UK TV series)

                                                                                                                                                                                                                                                  ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế