# Advent of Code 2023 - Day 6

This is a thread to discuss Day 6

REMEMBER!
It is VERY important NOT to write any public spoilers
ALWAYS keep spoiler stuff hidden inside one of these

Summary

This text will be hidden

which you can obtain by clicking on the gear icon

Good luck
FYI one of the features of Advent of Code is that we all get given different inputs so our answers will be different.
The examples are all the same but each of us gets different inputs for us to solve

Who decided the time would be measured in milliseconds? That is no time at all, and you'd need to be very precise about the amount of time held pressing a button.

Alright the realism rant is over, now it's time to actually give my solution.

Part 1

I took a different approach to finding the solution this time. I noticed a pattern, and thought about it in a mathematical way. It just looks for the minimum number of milliseconds held, then it just finds the max by doing
((total - (min) * 2) - 1))

simple math, no programming required, really

All you need to do is solve a quadratic equation. You could even use a simple calculator.

I've got back on the horse after giving Day 5 a miss and I found Part 1 relatively easy

And I even managed to use Pipe correctly

Part 1 scripts

Managed to do Part 2 but browser locked up when saving but here are my 2 gold stars to prove it