Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022 - Day 11 #212

Merged
merged 13 commits into from
Dec 18, 2022
Merged

2022 - Day 11 #212

merged 13 commits into from
Dec 18, 2022

Conversation

romellem
Copy link
Owner

The first real hard one. I was overthinking it, and unfortunately had to get help from the solutions thread for part two.

I originally was trying to store just the individual prime factors of the number, thinking that'd keep the number from exploding. Additionally, I could immediately take the square operation old * old and not do anything.

Only problem is: that means I have to solve what the prime factors are for really large numbers, which itself is really hard! So it didn't help as much as I planned.

But I need to change this, the items are ordered, so they can't be a
Set.
Hmmm not quite sure, maybe I do need BigInts?
I thought for sure that would work :(
Was hoping these would eventually cycle around but nope, always have
huge numbers that take forever to factor
@romellem romellem merged commit 9d44049 into master Dec 18, 2022
@romellem romellem deleted the 2022/day-11 branch December 18, 2022 19:35
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