# General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

## Advent of Code - Base A Style! (Post 2 of 26)

Highlighted
14 - Magnetar

One cool thing about this project is that everyone gets their own unique set of inputs, so our answers won't actually match each other.

So now let's dive into the challenges.

Day 1 - The Tyranny of the Rocket Equation

0.8 seconds to run!

Oh cool. Looks like a pretty soft launch. Take some numbers, divide, and round down. I should be able to do this in a single formula tool. Then, a summarize tool will take care of the total.

How do we lop off the decimal? Don't want to round, so I rely on the handy FLOOR function. This is a favorite. Basically cuts off the decimal altogether.

Since it's midnight on a Saturday, I'm hoping that it won't take long to solve. And it doesn't. Sub 2 minutes. Patting myself on the back, I foolishly think that I may be on the general leaderboard. Nope. Over 100 people solved before I did. Wow. So how did I track against Alteryx users? #2. Pretty happy with that!! But soon realize that this whole process will be, in no way, me trying to get on the leaderboard. I'm happy with completing the days, and sharing my thoughts and processes along the way.

Now on to part 2.....

We learn that fuel requires fuel, so we have to keep doing the formula above until we hit zero or a negative number. Getting loopy!! It's time to make this a macro. I chose an iterative macro in order to loop through each number until it's low enough. The macro itself is super simple. Same exact formula. Check if the result is zero or less, and iterate if it isn't. Write out everything to the output, but iterate only on the reduced number.

Took another 2-3 minutes to build this macro. Very fast run time.

Cheers!
Esther

Highlighted
15 - Aurora

@EstherB47  thanks for putting these recaps together!

For part 2, I opted for a generate rows solution.

11 - Bolide

My solution for day 1 was basically the same as @EstherB47's.

I really liked @patrick_digan's solution, though, because Generate Rows is a rarely-used tool for me. My mind went directly to an iterative macro, so I wouldn't have thought to use Generate Rows to iterate until a condition is met (which is exactly what it does!)