Problem 233
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.
Problem 233
Can someone confirm these results for Problem 233 (View Problem)?
Some random values of N such that f(N) = 420: 1328125, 84246500, 248431625.
My code compute approx 10^7 such numbers <= 10^11.
Thanks in advance.
Some random values of N such that f(N) = 420: 1328125, 84246500, 248431625.
My code compute approx 10^7 such numbers <= 10^11.
Thanks in advance.
Re: Problem 233
f(1328125) = 180SmuK wrote:Some random values of N such that f(N) = 420: 1328125, 84246500, 248431625.
f(84246500) = f(248431625) = 420
Re: Problem 233
"Congratulations, the answer you gave to problem 233 is correct."
Thanks a lot. It was a stupid bug
Thanks a lot. It was a stupid bug

 Posts: 20
 Joined: Sun Jan 25, 2009 6:14 pm
Re: Problem 233
My code returns 30875234922 for n<=38000000, is it correct?
 daniel.is.fischer
 Posts: 2400
 Joined: Sun Sep 02, 2007 11:15 pm
 Location: Bremen, Germany
Re: Problem 233
Yes.
Il faut respecter la montagne  c'est pourquoi les gypaètes sont là.
Re: Problem 233
for n<=10^10 i have 2709499279563106.
is it correct?
is it correct?
Re: Problem 233
Unfortunately, it's not.quintana wrote:for n<=10^10 i have 2709499279563106.
is it correct?
You aren't the first one to get this particular result, though.
Re: Problem 233
it's interesting because i have correct answer for 38000000. thanks!
Re: Problem 233
Yeah, you're on the right track, but are missing something that a lot of other people missed initially too.
ex ~100%'er... until the gf came along.
Re: Problem 233
quintana wrote:it's interesting because i have correct answer for 38000000. thanks!
It seems you got it now
Congratulations!
Re: Problem 233
thanks, i got it allright! i got the idea long time ago, but like p180 this one had a catch beyond idea. again, forum was very helpfull.
Re: Problem 233
Just a quick question for clarification:
"sum of the integers": Does it mean sum of the coordinates, that are integers up to 10^11? And if so: X or Y
"sum of the integers": Does it mean sum of the coordinates, that are integers up to 10^11? And if so: X or Y
Re: Problem 233
The actual value of the other integer coordinates on the circles are immaterial. Look at the definition given for f(N).What is the sum of all positive integers N
When you assume something, you risk being wrong half the time.
Re: Problem 233
I have an elegant algorithm that gives the same wrong results for 1e10, 1e11 and the correct one for 38e6. I don't see any way it could be doublecounting solutions.quilan wrote:Yeah, you're on the right track, but are missing something that a lot of other people missed initially too.
Now I'm running a bruteforce check counting down from 1e10 to see where it's making the mistake. It's taking forever. AAARGH! Would it help if I pull my hair out?
Seriously, this isn't something dumb like an overflow bug, is it?
update: Got it! It wasn't an overflow bug, I just had to look a little deeper into the characteristics of f().
Re: Problem 233
Same as everyone. As for now, i can't see any difference for even and odd N. And i can't understand why answer for 38000000 is correct and answer for 10^11 is not. I simply don't see any special cases between this numbers.
My code finds 5422051 solutions for 10^11. Is it too big or too small?
Update: Wait a bit, I've got an idea.
Update 2: And hero have won once again without any help!
There are 5422629 solutions in total and there is no difference between even and odd N. It's something else.
My code finds 5422051 solutions for 10^11. Is it too big or too small?
Update: Wait a bit, I've got an idea.
Update 2: And hero have won once again without any help!
There are 5422629 solutions in total and there is no difference between even and odd N. It's something else.
Re: Problem 233
The subject of N <= 10^10 came up, but without a definitive response. Can anyone tell me if the correct answer for 10^10 is...
2709680426923506
It's very close to what quintana had, but not quite the same.
I'm getting the right answer for N <= 38 million (though I'm not sure what was special about the number 38 million), but evidently not the right answer for N <= 10^11, and it's driving me a little nuts.
Thanks!
2709680426923506
It's very close to what quintana had, but not quite the same.
I'm getting the right answer for N <= 38 million (though I'm not sure what was special about the number 38 million), but evidently not the right answer for N <= 10^11, and it's driving me a little nuts.
Thanks!
Re: Problem 233
Sorry, it's too small.
Re: Problem 233
Sorry, small bug.
for N <= 10^10: 2710041165705856 ?
EDIT:
Nevermind! Introduced another small bug while fixing the first. Now they're both fixed!
for N <= 10^10: 2710041165705856 ?
EDIT:
Nevermind! Introduced another small bug while fixing the first. Now they're both fixed!
Re: Problem 233
Thank you for all the very helpful comments on this question. It helped me a lot when I saw a lot of other people missed one little thing. After I found that I felt I should give my diploma back.
So far one of the best problems I solved, even if it took me three days to solve it, but it worth.
So far one of the best problems I solved, even if it took me three days to solve it, but it worth.

 Posts: 5
 Joined: Thu Mar 01, 2012 1:11 pm
Re: Problem 233
Thanks to all posters above. I have to say that the open forum was great for this one  thanks for giving a sample answer for the problem on toy scale. When I realised my answer for 38000000 was wrong, i went hunting...
Helped me find a stupid bug using a less than instead of less than equals!!!! I'd had the code right since first writing it but for this bug!
Probably the hardest one I solved so far. Got the idea quite quickly, but debugging was a nightmare.
Helped me find a stupid bug using a less than instead of less than equals!!!! I'd had the code right since first writing it but for this bug!
Probably the hardest one I solved so far. Got the idea quite quickly, but debugging was a nightmare.