Exemple #1
0
        public void Day07a()
        {
            var input          = File.ReadAllText(".\\Content\\Day08.txt");
            var parsedMetaData = MetaDataCalculator.ParseMetaData(input);
            var output         = MetaDataCalculator.CalculateMetaDataCount(parsedMetaData);

            output.Should().Be(46781);
        }
Exemple #2
0
        public void Day07a_Test_b()
        {
            const string input          = "1 3 0 3 4 5 6 1 2 3";
            var          parsedMetaData = MetaDataCalculator.ParseMetaData(input);
            var          output         = MetaDataCalculator.CalculateMetaDataCount(parsedMetaData);

            output.Should().Be(21);
        }
Exemple #3
0
        public void Day07a_Test_c()
        {
            const string input          = "2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2";
            var          parsedMetaData = MetaDataCalculator.ParseMetaData(input);
            var          output         = MetaDataCalculator.CalculateMetaDataCount(parsedMetaData);

            output.Should().Be(138);
        }
Exemple #4
0
        public void Day07b()
        {
            var input          = File.ReadAllText(".\\Content\\Day08.txt");
            var parsedMetaData = MetaDataCalculator.ParseMetaData(input);
            var output         = MetaDataCalculator.CalculateNodeValue(parsedMetaData);

            output.Should().Be(21405);
        }