示例#1
0
        static async Task Main(string[] args)
        {
            var dayOneSolver = new DayOneSolver("../puzzle_input/day_1.txt");
            var solution     = await dayOneSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 1: {solution}.");

            var dayTwoSolver = new DayTwoSolver("../puzzle_input/day_2.txt");
            var solution2    = await dayTwoSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 2: {solution2}.");

            var dayThreeSolver = new DayThreeSolver("../puzzle_input/day_3.txt");
            var solution3      = await dayThreeSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 3: {solution3}.");

            var dayFourSolver = new DayFourSolver("../puzzle_input/day_4.txt");
            var solution4     = await dayFourSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 4: {solution4}.");

            var dayFiveSolver = new DayFiveSolver("../puzzle_input/day_5.txt");
            var solution5     = await dayFiveSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 5: {solution5}.");

            var daySixSolver = new DaySixSolver("../puzzle_input/day_6.txt");
            var solution6    = await daySixSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 6: {solution6}.");

            var daySevenSolver = new DaySevenSolver("../puzzle_input/day_7.txt");
            var solution7      = await daySevenSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 7: {solution7}.");

            var dayEightSolver = new DayEightSolver("../puzzle_input/day_8.txt");
            var solution8      = await dayEightSolver.SolveAsync().ConfigureAwait(false);

            Console.WriteLine($"Day 8: {solution8}.");
        }
示例#2
0
        static void Main(string[] args)
        {
            var solver = new DayOneSolver(new FileReader());

            solver.SolvePartOne();

            solver.SolvePartTwo();

            var solverTwo = new DayTwoSolver(new FileReader());

            solverTwo.SolvePartOne();

            solverTwo.SolvePartTwo();

            var solverThree = new DayThreeSolver(new FileReader());

            solverThree.SolvePartOne();
            solverThree.SolvePartTwo();

            var solverFour = new DayFourSolver();

            solverFour.SolvePartOne();
            solverFour.SolvePartTwo();
        }
示例#3
0
        public void Test10()
        {
            var solver = new DayFourSolver();

            Assert.AreEqual(231, solver.SolvePart2("../../../Resources/input-4-1.txt"));
        }
        public void solve_for_unknown_input_part_two()
        {
            var solver = new DayFourSolver();

            _outputHelper.WriteLine(solver.PartTwoSolve("271973-785961"));
        }