Skip to content

Optimize Problem 072#190

Merged
teemka merged 1 commit into
masterfrom
optimize/p72
Jul 4, 2026
Merged

Optimize Problem 072#190
teemka merged 1 commit into
masterfrom
optimize/p72

Conversation

@teemka

@teemka teemka commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Replace the per-number trial-division totient computation with a totient sieve (Euler's product formula applied one prime at a time across the whole range). Runtime drops from ~577ms to ~7ms, and the Fractions dependency is no longer needed in this problem.

🤖 Generated with Claude Code

Replace per-number trial-division totients with a totient sieve,
dropping the Fractions dependency from this problem.
Runtime goes from ~577ms to ~7ms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@teemka
teemka merged commit 1a3af50 into master Jul 4, 2026
3 checks passed
@teemka
teemka deleted the optimize/p72 branch July 4, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant