Problem 100

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
Yasha13
Posts: 2
Joined: Sat Aug 29, 2020 11:11 pm

Problem 100

Post by Yasha13 »

I am sure (99.99%) that solved correctly Problem 100.
But the system said that my answer is wrong.
Could someone let me know if the system recognizes his\her solution as correct?
Thank you.
User avatar
RobertStanforth
Administrator
Posts: 2666
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 100

Post by RobertStanforth »

Yasha13 wrote: Sat Aug 29, 2020 11:19 pm I am sure (99.99%) that solved correctly Problem 100.
But the system said that my answer is wrong.
Could someone let me know if the system recognizes his\her solution as correct?
Thank you.
I have verified that the system accepts the correct answer for this one.
Yasha13
Posts: 2
Joined: Sat Aug 29, 2020 11:11 pm

Re: Problem 100

Post by Yasha13 »

Thank you!
maxremzi
Posts: 2
Joined: Mon Aug 26, 2024 3:12 pm

Re: Problem 100

Post by maxremzi »

I'm not posting solutions here. Just need help.

My initial solution was rejected. :(
It was b = 707106788769 | N = 1000000010723 which is closer to 10^12.

My b is also smaller than the b in the solution.

b * (b-1) / N / (N-1) == 0.5 holds too.

Am I missing something?!
I'm super confused...
User avatar
RobertStanforth
Administrator
Posts: 2666
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 100

Post by RobertStanforth »

maxremzi wrote: Mon Aug 26, 2024 3:27 pm b * (b-1) / N / (N-1) == 0.5 holds too.
This does not precisely hold for those values of b and N. It's close, though: the discrepancy is so small that 64-bit floating point arithmetic would not detect it.
maxremzi
Posts: 2
Joined: Mon Aug 26, 2024 3:12 pm

Re: Problem 100

Post by maxremzi »

Yes you are right. I had only checked it on computer. Thanks a lot.
Post Reply