Exemplo n.º 1
0
        public static void RunDay3()
        {
            Console.WriteLine("Day3:");
            List <string> areaString = ReadFileByLineAsString(".//Day3//input");
            Day3          day3       = new Day3(areaString);
            Int64         endResult  = 0;

            endResult  = day3.Execute(1, 1);
            endResult *= day3.Execute(3, 1);
            endResult *= day3.Execute(5, 1);
            endResult *= day3.Execute(7, 1);
            endResult *= day3.Execute(1, 2);

            Console.WriteLine(endResult.ToString());
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var dayOneInput = File.ReadLines("Inputs/Day1Input.txt").Select(line => int.Parse(line)).ToList();

            Console.WriteLine($"Day One Part One: {Day1.PartOne(dayOneInput)}");
            Console.WriteLine($"Day One Part Two: {Day1.PartTwo(dayOneInput)}");

            var dayTwoInput     = File.ReadAllLines("Inputs/Day2Input.txt");
            var dayTwoInputList = new List <string>(dayTwoInput);

            Console.WriteLine($"Day Two Part One: {Day2.PartOne(dayTwoInputList)}");
            Console.WriteLine($"Day Two Part Two: {Day2.PartTwo(dayTwoInputList)}");

            var dayThreeInput     = File.ReadAllLines("Inputs/Day3Input.txt");
            var dayThreeInputList = new List <string>(dayThreeInput);

            Console.WriteLine($"Day Three Part One: {Day3.PartOne(dayThreeInputList)}");
            Console.WriteLine($"Day Three Part Two: {Day3.PartTwo(dayThreeInputList)}");
        }