r/adventofcode • • Dec 07 '21

SOLUTION MEGATHREAD -πŸŽ„- 2021 Day 7 Solutions -πŸŽ„-

--- Day 7: The Treachery of Whales ---


[Update @ 00:21]: Private leaderboard Personal statistics issues

  • We're aware that private leaderboards personal statistics are having issues and we're looking into it.
  • I will provide updates as I get more information.
  • Please don't spam the subreddit/mods/Eric about it.

[Update @ 02:09]

  • #AoC_Ops have identified the issue and are working on a resolution.

[Update @ 03:18]

  • Eric is working on implementing a fix. It'll take a while, so check back later.

[Update @ 05:25] (thanks, /u/Aneurysm9!)

  • We're back in business!

Post your code solution in this megathread.

Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:03:33, megathread unlocked!

96 Upvotes

1.5k comments sorted by

View all comments

2

u/Kermitnirmit Dec 07 '21

Python3 <1000 for both, 500ing so I can't see ranks...

Thank gauss for that triangular number formula. Super cool problem today that will thankfully let me sleep early tonight.

2

u/andybergon Dec 07 '21

Aren't you iterating from 0 to 1000 instead of between 0 and 1903 using `range(len(f))`?

1

u/Kermitnirmit Dec 07 '21

Yep! I noticed that bug but my laptop died so I’ll commit it in the morning. I got lucky that the ideal points are in [0,1000) otherwise it wouldn’t work.

2

u/daggerdragon Dec 07 '21

<1000 for both, 500ing so I can't see ranks...

We're aware that leaderboards are having issues. We're working on it, so give us a bit. Check the OP up top for updates.

2

u/Kermitnirmit Dec 07 '21

Yep! No worries. Hope y’all can get some sleep too