r/adventofcode • • Dec 04 '18

SOLUTION MEGATHREAD -πŸŽ„- 2018 Day 4 Solutions -πŸŽ„-

--- Day 4: Repose Record ---


Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).

Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


Advent of Code: The Party Game!

Click here for rules

Please prefix your card submission with something like [Card] to make scanning the megathread easier. THANK YOU!

Card prompt: Day 4

Transcript:

Today’s puzzle would have been a lot easier if my language supported ___.


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

edit: Leaderboard capped, thread unlocked!

38 Upvotes

340 comments sorted by

View all comments

Show parent comment

1

u/craigontour Dec 08 '18

You said you visually did calculation - which i did also - because I could nt get the minute part to work in Part 1. Evaluates to -1.

Did you test it?

1

u/ka-splam Dec 08 '18

Did I test what? This code works on my input, yes.

When I first did it by hand, I poked my finger at the screen and counted 59, 58, 57, 56 .. ok minute 45 has the biggest for guard 2663 so 2663*45 and put that into the site, no double-check then, too much hurry.

1

u/craigontour Dec 09 '18

I am sure it is me and my code. Thanks.