Jump to content
 Share

Nick

Advent of Code 2019

Recommended Posts

Posted  Edited by Joshy - Edit Reason: Removed

Not sure if it just wants the function?  Sounds like we'll throw it into some conditionals for Go (or No go) and this function will help us get the upper fuel limit?

 

[DAY 1]

 

N45lCEs.png

 

Edited by Joshy
Removed

PoorWDm.png?width=360&height=152

Share this post


Link to post
Share on other sites


I was able to get day 1 completed in under 40 minutes 😄 Man this is already fun! I can't wait until these get hard. I can only imagine how challenging they'll start getting after a while. I don't know if I'll be able to do them each day, though. Big rip right there.

 

Good luck to anyone who is participating. If you are stumped on day 1, don't worry. This is very good practice. Programming is all about problem solving. It takes time to get better at solving problems quickly. This is how you do it. The only reason why I am able to do this so quickly is because I have already made games. And that? That took HOURS upon H O U R S of problem solving and bug fixing xD

 

It's the only reason why I know I can do crazy stuff like this with for loops:

image.png.ddd64ea5ac25715a98e22de0e7d31ac9.png

Censored so the solution isn't completely spoiled xD Don't worry I won't provide anymore code from now on. All the other solutions are up to you guys. Good luck mibois


I write programs and stuff.

 

If you need to contact me, here is my discord tag: Dustin#6688

 

I am a busy person. So responses may be delayed.

1840045955_Thicco(1).thumb.png.87c04f05633286f3b45b381b4acc4602.png

 

Share this post


Link to post
Share on other sites


Posted  Edited by _Rocket_

Make sure to read the instructions carefully. Read it out loud. It helps you notice small details you may have missed. The entire question description needs to be read.

Edited by _Rocket_

I write programs and stuff.

 

If you need to contact me, here is my discord tag: Dustin#6688

 

I am a busy person. So responses may be delayed.

1840045955_Thicco(1).thumb.png.87c04f05633286f3b45b381b4acc4602.png

 

Share this post


Link to post
Share on other sites


Yea, I really love the storytelling in Advent of Code. It teaches you to navigate through bloated descriptions and identify the central pieces which is something you'll often have to do when working with customers, haha.


Wanna know what I am up to? Take a look at my personal Trello board or my cards on the Development Trello board!

Share this post


Link to post
Share on other sites


Oh yeah I'm getting prepared for the hell that is customer requests. You think understanding these instructions are hard? Oh boy I can only imagine.

 

The goal is to find important details. Find out what requests can be variables, what can be calculations, and what can be inputs. Find any constraints as well.

 

Since you are learning, I am gonna provide some hints only for day 1.

 

At the start you are just being fed useless information. You still want to read it just in case, but none of if really tells you any possible details you need to consider while writing your code.

 

Your first details lie within the expression to handle the fuel calculations. It gives you an exact process. n / 3, round that down. Then subtract 2. This will be your fuel count. It then gives you examples. These are just examples, so they really don't tell you any new ways to write your code. So ignore the examples unless you need them to help understand the expression better.

 

Next, there's one thing that is only said once. If you do not read carefully, you'll miss this in the sea of information. It asks for the TOTAL of all the fuel amounts. This is a vital part of the equation. Every time you calculate the fuel, you are going to need to add that calculation to a total. I suggest you use an unsigned int or some other variable to store the total. You will be constantly adding to this.

 

Lastly, it gives you an input. The input has MANY numbers. Like a list of them. The way you handle this is up to you, but I would suggest using a file I/O to cycle through all the inputs inside a text file.

 

All this should fall into place. You got an expression, you got a request (the request being they want the total of all the fuel values), and lastly you got an input. This is all you have been provided. Now try to write a program that gives the customer what they requested. And again, remember, they requested the total.

 

So yes, this means you should only be submitting a single number as the answer. Not a list of numbers. No letters or anything.

 

Everything else you will be doing on your own @Joshyi hope this helped you out a little.


I write programs and stuff.

 

If you need to contact me, here is my discord tag: Dustin#6688

 

I am a busy person. So responses may be delayed.

1840045955_Thicco(1).thumb.png.87c04f05633286f3b45b381b4acc4602.png

 

Share this post


Link to post
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...