Problem 375

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.
Post Reply
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Problem 375

Post by mdean »

Thought this one was going to be so simple. Then I find out that apparently C++ can't handle an array of 2 billion elements...
Image
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 375

Post by hk »

Try to find out how it can be done without such a memory hungry array but a more humble one.
Image
War ruins the life and health of untold numbers of innocent children.
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 375

Post by mdean »

Think I can see how to use less storage. Only question is what ramifications it will have for the overall calculation. It shouldn't hose me too badly, but that first step's going to be rotten. Probably going to have to sleep on it.
Image
alvaroeuler
Posts: 1
Joined: Thu Mar 15, 2012 8:19 pm

Re: Problem 375

Post by alvaroeuler »

Just so I save myself that feeling of deja-vu, could anyone confirm my suspicion that the answer is too large for 64 bits?
Thanks...
Image
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 375

Post by hk »

No, it fits in a 64 bit signed integer.
Image
War ruins the life and health of untold numbers of innocent children.
alpha.xiang
Posts: 6
Joined: Thu Nov 17, 2011 11:57 am

Re: Problem 375

Post by alpha.xiang »

I can't get the correct answer ,my result is xxx,but it's incorrect!

Edit by hk:
Removed (wrong) result.
Don't post results, wrong or not.
I told you before!
vamsikal3
Posts: 89
Joined: Sat Oct 01, 2016 9:25 am

Re: Problem 375

Post by vamsikal3 »

<deleted post>
Last edited by vamsikal3 on Wed Nov 25, 2020 4:22 pm, edited 1 time in total.
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 375

Post by hk »

In general we discourage asking for answers (even for lower limits).
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply