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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
ssp
Posts: 2
Joined: Sun Nov 11, 2007 7:49 am

Problem 093

Post by ssp »

Hello. I've suppose it's easy problem, and i solve it, but my algorithm seems wrong:
it can't found equation for {1,2,3,4} set where answer is 22. Can anyone post those equation?
(Problem statement says it exists).
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Problem 93 hint

Post by stijn263 »

2*(3*4-1) = 22
LarryBlake
Posts: 100
Joined: Sat Aug 29, 2009 8:49 pm

Re: Problem 093

Post by LarryBlake »

Well, I do get 28 for the example (digits 1, 2, 3, 4). But I also get the wrong overall answer.

Could someone please post another digit combination and its count, so that I can try to figure out where I'm going wrong? Thanks.
Image
LarryBlake
Posts: 100
Joined: Sat Aug 29, 2009 8:49 pm

Re: Problem 093

Post by LarryBlake »

Does this count:
(6 / 9) * 3 = 2

I wouldn't find that, because I reject 6/9 as not an integer. (Yes, I know I could have rewritten this as (3 * 6) / 9. Maybe it doesn't matter.)
Image
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 093

Post by daniel.is.fischer »

Yes, it does count. Intermediate results need not be integers, only the final result must be an integer.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
LarryBlake
Posts: 100
Joined: Sat Aug 29, 2009 8:49 pm

Re: Problem 093

Post by LarryBlake »

Okay, thanks. Could you please also post another combination and its count?
Image
LarryBlake
Posts: 100
Joined: Sat Aug 29, 2009 8:49 pm

Re: Problem 093

Post by LarryBlake »

Anyone?
Image
zwuupeape
Posts: 189
Joined: Tue Jun 09, 2009 6:11 pm

Re: Problem 093

Post by zwuupeape »

Yeah: 2679 gives 21 consecutive numbers, and 2389 gives 33.
LarryBlake
Posts: 100
Joined: Sat Aug 29, 2009 8:49 pm

Re: Problem 093

Post by LarryBlake »

Thank you.
Image
bobfin
Posts: 9
Joined: Thu Oct 22, 2009 7:06 am

Problem 93

Post by bobfin »

I have been struggling with problem 93 and think I have solution but my submitted solution is not correct. My method correctly finds that the digit set {1,2,3,4} yields a run of consecutive numbers 1 .. 28. Could anyone confirm the result for the set {4,5,7,8} is a sequence of 26 consecutive numbers. I hope this note is not a spoiler.
Fede
Posts: 1
Joined: Tue Mar 16, 2010 10:57 am

Re: Problem 93

Post by Fede »

Hi,
my probabilistic algo gives me:
Expand
17
consecutives for [4, 5, 7, 8].

It may not be exactly that but if it's not it should be pretty close.
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Problem 93

Post by stijn263 »

Problem 93 (View Problem)

I also get 17 for {4,5,7,8}. What solution does your program give for {4,5,7,8} --> 18 ?
bobfin
Posts: 9
Joined: Thu Oct 22, 2009 7:06 am

Re: Problem 093

Post by bobfin »

Thanks for the feedback. I have now located my problem (integer arithmetic) and have successfully completed the problem.
Tridecagon
Posts: 2
Joined: Sat Aug 07, 2010 4:26 pm
Location: Rome, Italy

Re: Problem 093

Post by Tridecagon »

Hi, could someone post the equation resulting in 15 for [2,6,7,9]? My algorithm doesn't find it and I can't figure out why.
Thanks!
Image
harryh
Posts: 2091
Joined: Tue Aug 22, 2006 9:33 pm
Location: Thessaloniki, Greece

Re: Problem 093

Post by harryh »

( 7 - ( 9 / 2 ) ) * 6
User avatar
rayfil
Administrator
Posts: 1406
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 093

Post by rayfil »

Would the following also be acceptable to you?

(9-6)*(7-2)
When you assume something, you risk being wrong half the time.
Tridecagon
Posts: 2
Joined: Sat Aug 07, 2010 4:26 pm
Location: Rome, Italy

Re: Problem 093

Post by Tridecagon »

Thanks for your help, I've found my mistake and solved the problem. :)
Image
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: Problem 093

Post by GenePeer »

zwuupeape wrote:Yeah: 2679 gives 21 consecutive numbers, and 2389 gives 33.
My final solution was correct and I got the same value for 2679 but not for 2389 :? How do you evaluate 15 with [2,3,8,9]?
Image
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 093

Post by TripleM »

3 * (9 - 8/2)
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: Problem 093

Post by GenePeer »

Thanks. I got lucky, my program was skipping a few combinations. I fixed the problem though.
Image
Post Reply