Problem 521

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
DeatH_StaR
Posts: 13
Joined: Sat Apr 19, 2014 4:09 pm

Problem 521

Post by DeatH_StaR » Fri Jul 24, 2015 7:58 am

Hi all,
Can problem 521 be solved by the "one minute rule"?
Just *counting* to 1012 took me on a fast computer more then 15 minutes (not finding primes, just counting).
So will I need to expect a slow solution, or am I missing something that will enable me to solve it fastly?

TripleM
Posts: 382
Joined: Fri Sep 12, 2008 2:31 am

Re: Problem 521

Post by TripleM » Fri Jul 24, 2015 8:31 am

Every problem satisfies the 1 minute rule. If you can't count to 10^12 in one minute, then clearly you shouldn't be trying to :P

DeatH_StaR
Posts: 13
Joined: Sat Apr 19, 2014 4:09 pm

Re: Problem 521

Post by DeatH_StaR » Fri Jul 24, 2015 9:20 am

Thanks, I got worried... :)

v6ph1
Posts: 114
Joined: Mon Aug 25, 2014 6:14 pm

Re: Problem 521

Post by v6ph1 » Sat Jul 25, 2015 11:55 pm

Even if you can not count from 1 to 10^12 within the 1 minute rule, it is possible to get the sum of all these numbers within less than 1 minute.
The same is true for some number theoretic functions.
So you may calc that sum in a different way.

-- v6ph1

PS: Simply sieving needs around 7 hours on a modern i7 CPU.
Image

User avatar
Marcus_Andrews
Administrator
Posts: 1452
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 521

Post by Marcus_Andrews » Sun Jul 26, 2015 5:17 pm

DeatH_StaR wrote:Hi all,
Can problem 521 be solved by the "one minute rule"?
Just *counting* to 1012 took me on a fast computer more then 15 minutes (not finding primes, just counting).
So will I need to expect a slow solution, or am I missing something that will enable me to solve it fastly?
We don't release problems unless we can confirm they are solvable in under a minute:

https://projecteuler.net/about
I've written my program but should it take days to get to the answer?
Absolutely not! Each problem has been designed according to a "one-minute rule", which means that although it may take several hours to design a successful algorithm with more difficult problems, an efficient implementation will allow a solution to be obtained on a modestly powered computer in less than one minute.
Image

vamsikal3
Posts: 104
Joined: Sat Oct 01, 2016 8:25 am

Re: Problem 521

Post by vamsikal3 » Tue Nov 13, 2018 3:57 am

Can someone verify the answer for n = 201820182018 is <snipped by modrator>? Thanks!
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image

philiplu
Posts: 18
Joined: Wed Aug 02, 2017 7:51 pm
Location: Redmond, WA, USA

Re: Problem 521

Post by philiplu » Tue Nov 13, 2018 8:07 am

vamsikal3 wrote:
Tue Nov 13, 2018 3:57 am
Can someone verify the answer for n = 201820182018 is <snipped by moderator>? Thanks!
Those are the correct final 9 digits.
Image

vamsikal3
Posts: 104
Joined: Sat Oct 01, 2016 8:25 am

Re: Problem 521

Post by vamsikal3 » Tue Nov 13, 2018 9:50 am

Thanks for verifying the result. philiplu, are you <snipped by moderator>? This blog was helpful in solving PE problems.
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image

User avatar
kenbrooker
Posts: 120
Joined: Mon Feb 19, 2018 3:05 am
Location: Oregon, USA

Re: Problem 521

Post by kenbrooker » Wed Nov 14, 2018 3:17 am

Ahhh... Silly me... I thought --
"This forum is not meant to publish solutions."
"In particular don't post any ... results."
"Good Judgment comes from Experience;
Experience comes from Bad Judgment
..."
Image

User avatar
yourmaths
Posts: 25
Joined: Mon Aug 25, 2014 10:00 am

Re: Problem 521

Post by yourmaths » Wed Nov 14, 2018 9:45 am

There are plenty of test solutions in these forums... maybe the rule needs to be clarified?
level = lambda number_solved: number_solved // 25
Image

Post Reply