day7 readme update
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
|
||||
Advent of Code
|
||||
|
||||
[About][Events][Shop][Settings][Log Out]
|
||||
|
||||
SpaceMoehre 13*
|
||||
0x0000|2023
|
||||
|
||||
[Calendar][AoC++][Sponsors][Leaderboard][Stats]
|
||||
|
||||
Our sponsors help make Advent of Code possible:
|
||||
THE MERGE - The Developer Experience Conference in Berlin, June 2024 (created by the co-founder of GitHub)
|
||||
--- Day 7: Camel Cards ---
|
||||
|
||||
Your all-expenses-paid trip turns out to be a one-way, five-minute ride in an airship. (At least it's a cool airship!) It drops you off at the edge of a vast desert and descends back to Island Island.
|
||||
@@ -54,6 +66,35 @@ Now, you can determine the total winnings of this set of hands by adding up the
|
||||
|
||||
Find the rank of every hand in your set. What are the total winnings?
|
||||
|
||||
To play, please identify yourself via one of these services:
|
||||
Your puzzle answer was 254024898.
|
||||
|
||||
[GitHub] [Google] [Twitter] [Reddit] - [How Does Auth Work?]
|
||||
The first half of this puzzle is complete! It provides one gold star: *
|
||||
--- Part Two ---
|
||||
|
||||
To make things a little more interesting, the Elf introduces one additional rule. Now, J cards are jokers - wildcards that can act like whatever card would make the hand the strongest type possible.
|
||||
|
||||
To balance this, J cards are now the weakest individual cards, weaker even than 2. The other cards stay in the same order: A, K, Q, T, 9, 8, 7, 6, 5, 4, 3, 2, J.
|
||||
|
||||
J cards can pretend to be whatever card is best for the purpose of determining hand type; for example, QJJQ2 is now considered four of a kind. However, for the purpose of breaking ties between two hands of the same type, J is always treated as J, not the card it's pretending to be: JKKK2 is weaker than QQQQ2 because J is weaker than Q.
|
||||
|
||||
Now, the above example goes very differently:
|
||||
|
||||
32T3K 765
|
||||
T55J5 684
|
||||
KK677 28
|
||||
KTJJT 220
|
||||
QQQJA 483
|
||||
|
||||
32T3K is still the only one pair; it doesn't contain any jokers, so its strength doesn't increase.
|
||||
KK677 is now the only two pair, making it the second-weakest hand.
|
||||
T55J5, KTJJT, and QQQJA are now all four of a kind! T55J5 gets rank 3, QQQJA gets rank 4, and KTJJT gets rank 5.
|
||||
|
||||
With the new joker rule, the total winnings in this example are 5905.
|
||||
|
||||
Using the new joker rule, find the rank of every hand in your set. What are the new total winnings?
|
||||
|
||||
Answer:
|
||||
|
||||
Although it hasn't changed, you can still get your puzzle input.
|
||||
|
||||
You can also [Shareon Twitter Mastodon] this puzzle.
|
||||
|
||||
Reference in New Issue
Block a user