day_03

package
v0.0.0-...-07010e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcCO2ScrubberRating

func CalcCO2ScrubberRating(bcs []BinCode) (int, error)

func CalcOxygenGeneratorRating

func CalcOxygenGeneratorRating(bcs []BinCode) (int, error)

func LeastCommon

func LeastCommon(bcs []BinCode, bitIdx int) bool

func MostCommon

func MostCommon(bcs []BinCode, bitIdx int) bool

func Part1

func Part1()

func Part2

func Part2()

Types

type BinCode

type BinCode []bool

func FilterBinCodesLeastCommon

func FilterBinCodesLeastCommon(bcs []BinCode, bitIdx int) []BinCode

func FilterBinCodesMostCommon

func FilterBinCodesMostCommon(bcs []BinCode, bitIdx int) []BinCode

func ParseBinCode

func ParseBinCode(s string) (BinCode, error)

func ParseBinCodes

func ParseBinCodes(in string) ([]BinCode, error)

func (BinCode) Int

func (bc BinCode) Int() int

type LifeSupportRating

type LifeSupportRating struct {
	// contains filtered or unexported fields
}

func CalcLifeSupportRating

func CalcLifeSupportRating(in string) (LifeSupportRating, error)

func (LifeSupportRating) Value

func (r LifeSupportRating) Value() int

type Rate

type Rate struct {
	// contains filtered or unexported fields
}

func CalcRate

func CalcRate(in string) (Rate, error)

func (Rate) Power

func (r Rate) Power() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL