Problem 120
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.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
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 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.
-
bobfin
- Posts: 9
- Joined: Thu Oct 22, 2009 7:06 am
Problem 120
Apoplogies for posting on a relatively old problem but I've only recently discovered the site. Could anyone provide some feedback on problem 120. I thought I had a suitable algorithm which correctly calculates the a = 7, rmax = 42 example provided. However my total is incorrect. Hoping this doesn't breach your guidelines re-solutions, could anyone confirm that these early values are correct:
a = 3 rmax = 6
a = 4 rmax = 8
a = 5 rmax = 10
a = 6 rmax = 12
a = 7 rmax = 42
a = 8 rmax = 48
a = 9 rmax = 54
a = 10 rmax = 60
a = 11 rmax = 110
a = 12 rmax = 120
a = 13 rmax = 130
a = 14 rmax = 140
a = 15 rmax = 210
a = 3 rmax = 6
a = 4 rmax = 8
a = 5 rmax = 10
a = 6 rmax = 12
a = 7 rmax = 42
a = 8 rmax = 48
a = 9 rmax = 54
a = 10 rmax = 60
a = 11 rmax = 110
a = 12 rmax = 120
a = 13 rmax = 130
a = 14 rmax = 140
a = 15 rmax = 210
- daniel.is.fischer
- Posts: 2400
- Joined: Sun Sep 02, 2007 11:15 pm
- Location: Bremen, Germany
Re: Problem 120
55+75 [cong] 24 (mod 36).
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
-
bobfin
- Posts: 9
- Joined: Thu Oct 22, 2009 7:06 am
-
SJ_Mufasa
- Posts: 3
- Joined: Sat Jun 26, 2010 10:25 am
-
SJ_Mufasa
- Posts: 3
- Joined: Sat Jun 26, 2010 10:25 am
Re: Problem 120
what's this question asking exactly?
is it asking for the sum of all the rmax values for a in range2<a<1001
so 6 + 8 + 10 + 24 + 42 + 48....until it reaches the rmax for a=100?
is it asking for the sum of all the rmax values for a in range2<a<1001
so 6 + 8 + 10 + 24 + 42 + 48....until it reaches the rmax for a=100?
-
harryh
- Posts: 2091
- Joined: Tue Aug 22, 2006 9:33 pm
- Location: Thessaloniki, Greece
Re: Problem 120
None is specified by the problem, so n can take any (positive) integer value.SJ_Mufasa wrote:what's the range that the n value can have??
Yes, up to a=1000.what's this question asking exactly?
is it asking for the sum of all the rmax values for a in range2<a<1001
so 6 + 8 + 10 + 24 + 42 + 48....until it reaches the rmax for a=100?
-
SJ_Mufasa
- Posts: 3
- Joined: Sat Jun 26, 2010 10:25 am
-
frogboy77
- Posts: 10
- Joined: Thu Aug 26, 2010 9:03 pm
Re: Problem 120
need help
is this true
when
a=5; rmax=20 when n=7
?
looking at previous posts it doesn't look promising both showing 10
its late maybe me being dumb
p.s can this problem be done in ULL range?
sorry mean 64bit int range
is this true
when
a=5; rmax=20 when n=7
?
looking at previous posts it doesn't look promising both showing 10
its late maybe me being dumb
p.s can this problem be done in ULL range?
sorry mean 64bit int range
- jaap
- Posts: 588
- Joined: Tue Mar 25, 2008 3:57 pm
- Contact:
Re: Problem 120
Correct.frogboy77 wrote:a=5; rmax=20 when n=7
It can quite comfortably be done in 32 bit range too.frogboy77 wrote:p.s can this problem be done in ULL range?
sorry mean 64bit int range
-
oleglyamin
- Posts: 39
- Joined: Mon Aug 08, 2011 8:49 am
Problem 120 - I think correct answer is incorrect
I'm kinda struggling with how to describe an error without hinting at how the problem should be solved...
But the answer which project euler takes as correct one assumes that the maximum remainder for, say, a = 705 is r = 496320. In fact, it's 494910.
Please, check.
But the answer which project euler takes as correct one assumes that the maximum remainder for, say, a = 705 is r = 496320. In fact, it's 494910.
Please, check.
- thedoctar
- Posts: 128
- Joined: Fri Apr 15, 2011 11:57 am
- Location: Sydney, Australia
Re: Problem 120 - I think correct answer is incorrect
You are not supposed to create new threads about a problem. You probably didn't know this cause you're new, but please post your problem in this thread: Problem 120. If you have a problem on a problem, search the forum for "Problem xxx", where xxx is the problem number. There will already be an existing thread there.
An admin will probably delete this thread or something.
Also, the answers to problems are never wrong. Problem 120 can be solved through analysis. I solved it through pen/paper, didn't even need a program!
An admin will probably delete this thread or something.
Also, the answers to problems are never wrong. Problem 120 can be solved through analysis. I solved it through pen/paper, didn't even need a program!
Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz

fabas indulcet fames

fabas indulcet fames
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 120 - I think correct answer is incorrect
oleglyamin wrote:I'm kinda struggling with how to describe an error without hinting at how the problem should be solved...
But the answer which project euler takes as correct one assumes that the maximum remainder for, say, a = 705 is r = 496320. In fact, it's 494910.
Please, check.
From the Project Euler about page:
I've checked my program ten times now and I keep getting told my answer is wrong! Have you made a mistake?
With newly released problems it is quite possible that a small error may have slipped through the net, or maybe the wording is slightly ambiguous and the problem has not been explained as well as it could. However, when so many people have hit the target and one marksman misses ten times on the run, he/she can hardly shoot his/her own foot and conclude that because the gun is working properly the fault must lie in the target.
Or to put it more clear:With newly released problems it is quite possible that a small error may have slipped through the net, or maybe the wording is slightly ambiguous and the problem has not been explained as well as it could. However, when so many people have hit the target and one marksman misses ten times on the run, he/she can hardly shoot his/her own foot and conclude that because the gun is working properly the fault must lie in the target.
if about 4400 people have solved this problem, do you think they all solved it wrong?
Don't you think we would have been told the answer was wrong much and much earlier?

War ruins the life and health of untold numbers of innocent children.
-
oleglyamin
- Posts: 39
- Joined: Mon Aug 08, 2011 8:49 am
-
oleglyamin
- Posts: 39
- Joined: Mon Aug 08, 2011 8:49 am
-
mdenhoed
- Posts: 1
- Joined: Sun Apr 24, 2016 6:36 pm
Problem 120
Issue already solved.
Last edited by mdenhoed on Sat Jan 21, 2017 11:00 am, edited 3 times in total.
- mpiotte
- Administrator
- Posts: 1961
- Joined: Tue May 08, 2012 5:40 pm
- Location: Montréal, Canada
-
cornielleandres
- Posts: 1
- Joined: Fri Sep 07, 2018 4:02 am
Re: Problem 120
bobfin wrote: Thu Oct 22, 2009 10:06 pm Apoplogies for posting on a relatively old problem but I've only recently discovered the site. Could anyone provide some feedback on problem 120. I thought I had a suitable algorithm which correctly calculates the a = 7, rmax = 42 example provided. However my total is incorrect. Hoping this doesn't breach your guidelines re-solutions, could anyone confirm that these early values are correct:
a = 3 rmax = 6
a = 4 rmax = 8
a = 5 rmax = 10
a = 6 rmax = 12
a = 7 rmax = 42
a = 8 rmax = 48
a = 9 rmax = 54
a = 10 rmax = 60
a = 11 rmax = 110
a = 12 rmax = 120
a = 13 rmax = 130
a = 14 rmax = 140
a = 15 rmax = 210
How can a=5; rmax=10 and a=5;rmax=20 both be correct?jaap wrote: Sat Sep 25, 2010 2:42 amCorrect.frogboy77 wrote:a=5; rmax=20 when n=7It can quite comfortably be done in 32 bit range too.frogboy77 wrote:p.s can this problem be done in ULL range?
sorry mean 64bit int range
- kenbrooker
- Posts: 187
- Joined: Mon Feb 19, 2018 3:05 am
- Location: Northern California, USA
Re: Problem 120
Only one is correct...
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."

Experience comes from Bad Judgment..."

-
papadil
- Posts: 10
- Joined: Tue May 26, 2020 12:08 am
Re: Problem 120
I started with the problems just recently and use it to learn different programming languages. But I'm posting a question on this problem that is bugging me. For example, one of the above entries has, for a=9, max = 60. That is true for n = 3, but for n=9 it is 80. What am I missing, in particular since n is not bounded (yes the entries will repeat eventually due to the modulus)? Clarification would be much appreciated.
- kenbrooker
- Posts: 187
- Joined: Mon Feb 19, 2018 3:05 am
- Location: Northern California, USA
Re: Problem 120
rmax does not equal 60 when n=3...
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."

Experience comes from Bad Judgment..."


