14
$\begingroup$

Add the four basic operators $\times\div+\,\;-$ and optionally brackets to:

$10 \quad 9 \quad 8 \quad 7 \quad 6 \quad 5 \quad 4 \quad 3 \quad 2 \quad 1$

To get the total $2017$.

Rules:

  • Look for the simplest solution - i.e. the least amount of characters (ignoring spaces). Please include your character count in your answer.
  • Keep the order; do not add or combine numbers.
  • Use all four operators at least once.

Credit for initial concept: Alex Bellos


Previous year: here.

$\endgroup$
  • $\begingroup$ Is implicit multiplication allowed? $\endgroup$ – Beastly Gerbil Jan 1 '17 at 12:11
  • $\begingroup$ For best solution you can mix up the numbers like 109X87+6543-21 $\endgroup$ – Black Mamba Jan 1 '17 at 13:27
  • 8
    $\begingroup$ As of 2017 Code Golf is invading puzzling. $\endgroup$ – Zxyrra Jan 1 '17 at 16:05
  • 1
    $\begingroup$ Just being curious about it: is there a known algorithm to solve it? (given inputs: list of possible numbers, desired result). I'm thinking about dynamic programing. Also don't know how I could call this problem to look for litterature. $\endgroup$ – pltrdy Jan 2 '17 at 11:57
  • $\begingroup$ @pltrdy Have you read this post? $\endgroup$ – xzczd Jan 5 '17 at 14:58
22
$\begingroup$

This one is 20 characters:

$10×9×8×7 \div 6 \div 5×4×3 + 2 - 1$

$\endgroup$
  • 6
    $\begingroup$ @Paparazzi thanks - I think I left my counting skills in 2016. $\endgroup$ – Glorfindel Jan 1 '17 at 12:42
  • 8
    $\begingroup$ Will work for the next two years as well (changing the final - to a x or +) $\endgroup$ – Tom Carpenter Jan 1 '17 at 15:26
  • $\begingroup$ @TomCarpenter And it would also work for 2013-2015 by flipping the sign for 2 and manipulating the operator for 1 accordingly. This should also be the shortest answer, considering it has no brackets. $\endgroup$ – Reti43 Jan 1 '17 at 23:54
  • $\begingroup$ I wrote a script to try all combinations without parenthesis, this is the only one it finds. $\endgroup$ – C5H8NNaO4 Jan 2 '17 at 2:35
  • $\begingroup$ @TomCarpenter no it would not: a - sign would be missing. $\endgroup$ – Cœur Jan 2 '17 at 11:36
16
$\begingroup$

One can even find $2017$ by using only 5 numbers given in the question without changing the order as below:

$9×8×7×4+1=2017$

Here are the actual answers for the question:

  1. $(10+9×8×7-6-5)×4+3+2×1=2017$ - 22 Chars

  2. $(10×9×8×7)\div((6×5)\div(4×3))+2-1=2017$ - 28 Chars

  3. $10×9×8×7×6\div5\div(4-3+2)+1=2017$ - 22 Chars

  4. $(10+9×8×7-6-5)×4+3+2\div1=2017$ - 22 Chars

  5. $10×9×8×7\div(6+5+4)×3×2+1=2017$ - 22 Chars

  6. $10-9+8×7×6×(5-4)×3×2\div1=2017$ - 22 Chars

  7. $(10-9+8)×7×(6-5+(4-3)×2)+1=2017$ - 26 Chars

  8. $(10+9)×8×(7+6)+5+4×3×(2+1)=2017$ - 26 Chars

$\endgroup$
  • 2
    $\begingroup$ You can simplify some of those, considering a ÷ (b ÷ c) = a ÷ b × c and a ÷ (b × c) = a ÷ b ÷ c $\endgroup$ – Daerdemandt Jan 1 '17 at 20:35
  • 2
    $\begingroup$ #3 has mismatching brackets $\endgroup$ – vrwim Jan 2 '17 at 0:49
  • $\begingroup$ Can you include the number of characters for each? $\endgroup$ – IAmInPLS Jan 2 '17 at 11:17
  • $\begingroup$ @IAmInPLS fixed all errors... $\endgroup$ – Oray Jan 2 '17 at 11:45
2
$\begingroup$

22 characters:

$10×9×8×7×6÷5÷(4−3+2)+1$

There may be less, but pretty happy about this

There is also:

$10×9×8×7×6÷(5+4×3−2)+1$

Which is same length but slightly different

$\endgroup$
1
$\begingroup$

(((10*9*8*7)/(6*5))*4*3)+2-1=2017

$\endgroup$
1
$\begingroup$

2017 = 10+9+8+7+6+5+4+3+2+1+987+654+321

$\endgroup$
  • $\begingroup$ While this is a rather interesting result, this is not an answer to the question. $\endgroup$ – greenturtle3141 Jan 6 '17 at 6:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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