## Problem 093

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't post any spoilers
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

### Re: Problem 093

Yes, see the fourth example where * has been used more than once.
TiptTop
Posts: 4
Joined: Mon Aug 03, 2015 1:38 am

### Re: Problem 093

TripleM wrote:Yes, see the fourth example where * has been used more than once.
Seems like I did not understand the problem clearly.

It says ".... it is possible to obtain thirty-one different target numbers .... and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number"

From the rules stated in the problem statement, one can get 31 different numbers with largest number 36. Then what is 28? Please clarify. Thanks.
jaap
Posts: 554
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

### Re: Problem 093

TiptTop wrote:
TripleM wrote:Yes, see the fourth example where * has been used more than once.
Seems like I did not understand the problem clearly.

It says ".... it is possible to obtain thirty-one different target numbers .... and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number"

From the rules stated in the problem statement, one can get 31 different numbers with largest number 36. Then what is 28? Please clarify. Thanks.
All the numbers 1, 2, ..., 28 are expressible, 29 is the first number that is non-expressible using the set {1,2,3,4}.

The question asks you to find a different set of digits; chosen to make that first non-expressible number is as high as possible.
v6ph1
Posts: 128
Joined: Mon Aug 25, 2014 7:14 pm

### Re: Problem 093

As stated in the problem description:
You can express all numbers from 1 to 28 - but not 29.
30 = 2*3*(1+4), 32 = 2*(1+3)*4 and 36 are the other three.
TiptTop
Posts: 4
Joined: Mon Aug 03, 2015 1:38 am

### Re: Problem 093

Thanks guys.
joachim-ma
Posts: 2
Joined: Fri Mar 11, 2016 1:50 pm

### Re: Problem 093

Hi, it's my first post in this forum
I don't get it, to build the 27 with the set in the example {1,2,3,4}
Could anybody help me?
sjhillier
Posts: 558
Joined: Sun Aug 17, 2014 4:59 pm
Location: Birmingham, UK
Contact:

### Re: Problem 093

Think of the divisors of $27$, eg $27=3 \times 9$ . Now how can you reach $3$ and $9$ with the given inputs? I'm sure you'll work it out!
joachim-ma
Posts: 2
Joined: Fri Mar 11, 2016 1:50 pm

### Re: Problem 093

sjhillier wrote:Think of the divisors of $27$, eg $27=3 \times 9$ . Now how can you reach $3$ and $9$ with the given inputs? I'm sure you'll work it out!
Thank you, I was blind
itteerde
Posts: 8
Joined: Wed Dec 31, 2014 6:59 am

### Re: Problem 093

can someone plz check which case/s are wrong? Although I do not have any code fine tuned to the example it gets the exmple right but not the answer:

{{9},{0,1,2,3}}
{{10},{0,1,2,4}}
{{12},{0,1,2,5}}
{{14},{0,1,2,6}}
{{15},{0,2,3,7}}
{{28},{1,2,3,4}} //example
{{34},{1,2,3,8}}
{{37},{1,2,4,7}}
{{40},{1,2,4,9}}
{{43},{1,2,5,6}}

if that is what you get you are missing terms such as (9-(6-2))*3=15 and your shortcut does not work at all - back to proper tree of operators...
DJohn
Posts: 63
Joined: Sat Oct 11, 2008 12:24 pm

### Re: Problem 093

itteerde wrote: Fri May 05, 2017 7:13 pm can someone plz check which case/s are wrong?
This forum isn't supposed to be for hints or checking partial solutions, although it seems that rule can be a bit flexible sometimes. You have correctly understood the problem.

Is it possible to make 8 from {1,3,7,9}?
parasakin
Posts: 1
Joined: Tue Aug 01, 2017 1:47 am

### Re: Problem 093

Am I missing something????

1 = 6 + 8 / 9 - 5
2 = 6 + 9 - 5 - 8
3 = 8 + 6 / 9 - 5
4 = 8 + 9 / 6 - 5
5 = 9 + 8 / 6 - 5
6 = 8 + 9 - 5 - 6
7 = 8 * 9 / 6 - 5
8 = 8 + 5 / 6 * 9
9 = 9 + 5 / 6 * 8
10 = 5 + 6 + 8 - 9
11 = 5 + 6 + 8 / 9
12 = 5 + 6 + 9 - 8
13 = 5 + 8 + 6 / 9
14 = 5 + 8 + 9 / 6
15 = 5 + 9 + 8 / 6
16 = 5 + 8 + 9 - 6
17 = 8 + 9 + 5 / 6
18 = 6 + 8 + 9 - 5
19 = (5 + 8) * 9 / 6
20 = 6 + 8 * 9 / 5
21 = (8 - 5) * 9 - 6
22 = 5 * 9 / (8 - 6)
23 = (8 - 6) * 9 + 5
24 = 5 * 6 / 9 * 8
25 = 5 * 8 - 6 - 9
26 = 5 * 6 * 8 / 9
27 = 5 * 6 / 8 * 9
28 = 5 + 6 + 8 + 9
29 = 8 + 5 * 6 - 9
30 = 5 * 6 + 8 / 9
31 = 9 + 5 * 6 - 8
32 = (9 - 5) * 6 + 8
33 = 5 * 6 * 9 / 8
34 = 6 * 8 - 5 - 9
35 = (6 + 9 - 8) * 5
36 = (5 + 9 - 8) * 6
37 = 6 + 5 * 8 - 9
38 = (9 - 5) * 8 + 6
39 = 5 * 8 - 9 / 6
40 = 5 * 8 + 6 / 9
41 = 5 * 8 + 9 / 6
42 = 8 * 9 - 5 * 6
43 = 6 + 5 * 9 - 8
44 = 5 + 6 * 8 - 9
45 = 5 * 9 + 6 / 8
46 = 5 * 9 + 8 / 6
47 = 8 + 9 + 5 * 6
48 = 6 * 8 + 5 / 9
49 = 6 * 8 + 9 / 5
50 = (9 + 8 / 6) * 5
51 = 5 + 6 * 9 - 8
52 = 9 + 6 * 8 - 5
53 = 6 * 9 - 8 / 5
54 = 6 * 9 + 5 / 8
55 = 6 + 9 + 5 * 8
56 = 5 * 9 / 6 * 8
57 = 8 + 6 * 9 - 5
jaap
Posts: 554
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

### Re: Problem 093

parasakin wrote: Tue Aug 01, 2017 1:50 am Am I missing something????

1 = 6 + 8 / 9 - 5
6 + 8 / 9 - 5 is not a whole number (=1.88888....). Many computer languages will round an integer division such as 8/9 down to zero, but that is not a valid answer to the question. Take a good look at the examples given in the problem.
TexasRebel
Posts: 7
Joined: Sun Aug 02, 2015 8:14 pm

### Re: Problem 093

This is my last problem in the first 100...

I'm having a very difficult time not just guessing the 126 possible answers.
Posts: 78
Joined: Mon Jun 10, 2013 7:31 am

### Re: Problem 093

What happens when if a number cannot be evenly divided. -- Does it just treat as int division.

AKA
1 / 2 = 0
or
1 / 2 = 0.5f

?

Rishada is the gateway to free trade—but the key will cost you.