feat(euler): Optimize problem 034 with a lower upper bound#13531
Open
ArnabTechiee wants to merge 2 commits intoTheAlgorithms:masterfrom
Open
feat(euler): Optimize problem 034 with a lower upper bound#13531ArnabTechiee wants to merge 2 commits intoTheAlgorithms:masterfrom
ArnabTechiee wants to merge 2 commits intoTheAlgorithms:masterfrom
Conversation
Author
|
Hi @dhruvmanila, I've submitted a pull request (#13531) that contributes to this optimization issue. It implements the suggested fix for Problem 034 by lowering the upper bound. I would appreciate a review when you have a free moment. I'm ready to make any changes needed. Thank you! |
mindaugl
reviewed
Oct 16, 2025
Contributor
mindaugl
left a comment
There was a problem hiding this comment.
The link does not seem to work, it redirects to unrelated webpage.
Author
Thanks again for the feedback, @mindaugl. I've replaced the previous link with a stable source from Rosetta Code that details the proof. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to #8594
Description
This pull request optimizes the solution for Project Euler Problem 34 (
problem_034/sol1.py).The change replaces the previous, larger upper bound calculation with a more efficient, mathematically proven limit of
1,499,999. This significantly reduces the number of iterations required to find the solution, making the code much faster.This optimization is based on the proof referenced in the original issue.
How I Tested It
The updated solution's correctness has been verified by running the project's validation script:
python scripts/validate_solutions.py 34