Example #1
0
        public void Star2()
        {
            _input       = FileHelpers.Read(_filePath);
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star2(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(294354277694107m, solution);
        }
Example #2
0
        public void Star1()
        {
            _input       = FileHelpers.Read(_filePath);
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star1(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(1915, solution);
        }
Example #3
0
        public void Star2_Test3()
        {
            _input = new[]
            {
                "0",
                "67,7,59,61"
            };
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star2(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(754018m, solution);
        }
Example #4
0
        public void Star2_Test2()
        {
            _input = new[]
            {
                "0",
                "17,x,13,19"
            };
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star2(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(3417m, solution);
        }
Example #5
0
        public void Star2_Test1()
        {
            _input = new[]
            {
                "0",
                "7,13,x,x,59,x,31,19"
            };
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star2(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(1068781m, solution);
        }
Example #6
0
        public void Star2_Test6()
        {
            _input = new[]
            {
                "0",
                "1789,37,47,1889"
            };
            _parsedInput = _parser.Parse(_input);

            var solution = _solver.Star2(_parsedInput);

            Console.WriteLine(solution);
            Assert.AreEqual(1202161486m, solution);
        }
Example #7
0
 public void SetUp()
 {
     _solver = new Day13Solver();
     _input  = new Day13Input();
 }