Skip to content

yxian9/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Getting started

First and foremost, go to the Advent of Code website and log in and obtain the cookie.

In request header, in the request.header.cookie, find the session={value} pair.

Copy the {value} part to cmd/cookie.txt file.(do not include the session= part)

Build the adventofcode go command-line tool:

cd go
make build
## color test
go install github.com/rakyll/gotest@latest

Get started on your first puzzle:

./generate -d 1 -y 2024 # default will use current day / year

The command above will create a template solution file where your code will go. Your next steps should be:

  1. Implement your solution in the solution.go file. update test.input file fro aoc website. Use this command to test it:

    go test ./y2024/d01/*
    go run  ./y2024/d01/* 
    #
    gotest 
  2. Once you think you have found the answer to the problem, submit it on the adventofcode.com website. If it's the right answer, congrats!

Helpers

When logged in to the adventofcode.com website, your browser has a cookie called session. Retrieve this cookie's value and save it to the cmd/cookie.txt. CLI will automatically download your input for the day.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors