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

Day 4: The Ideal Stocking Stuffer Part One #39

Closed
Tracked by #27
ValdineiJunior opened this issue Apr 24, 2023 · 0 comments
Closed
Tracked by #27

Day 4: The Ideal Stocking Stuffer Part One #39

ValdineiJunior opened this issue Apr 24, 2023 · 0 comments

Comments

@ValdineiJunior
Copy link
Owner

ValdineiJunior commented Apr 24, 2023

Day 4: The Ideal Stocking Stuffer Part One

--- Day 4: The Ideal Stocking Stuffer ---
Santa needs help mining some AdventCoins (very similar to bitcoins) to use as gifts for all the economically forward-thinking little girls and boys.

To do this, he needs to find MD5 hashes which, in hexadecimal, start with at least five zeroes. The input to the MD5 hash is some secret key (your puzzle input, given below) followed by a number in decimal. To mine AdventCoins, you must find Santa the lowest positive number (no leading zeroes: 1, 2, 3, ...) that produces such a hash.

For example:

If your secret key is abcdef, the answer is 609043, because the MD5 hash of abcdef609043 starts with five zeroes (000001dbbfa...), and it is the lowest such number to do so.
If your secret key is pqrstuv, the lowest number it combines with to make an MD5 hash starting with five zeroes is 1048970; that is, the MD5 hash of pqrstuv1048970 looks like 000006136ef....
Your puzzle input is bgvyzdsv.

Solução

@ValdineiJunior ValdineiJunior mentioned this issue Apr 24, 2023
7 tasks
@ValdineiJunior ValdineiJunior changed the title Day 4: The Ideal Stocking Stuffer Day 4: The Ideal Stocking Stuffer Part One Apr 24, 2023
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

No branches or pull requests

1 participant