コード例 #1
0
        public void Part1()
        {
            var day    = new Day9(TestData, 5);
            var result = day.FindFirstInvalidNumber();

            Assert.Equal(127, result);
        }
コード例 #2
0
        public async Task Part1DataAsync()
        {
            var data = await FileHelper.GetInputAsText(Day);

            var day    = new Day9(data, 25);
            var result = day.FindFirstInvalidNumber();

            Output.WriteLine(result.ToString());
        }
コード例 #3
0
        public async Task Part2DataAsync()
        {
            var data = await FileHelper.GetInputAsText(Day);

            var day    = new Day9(data, 25);
            var num    = day.FindFirstInvalidNumber();
            var result = day.FindContigousSumOfAndGetSumOfSmallestAndLargestNum(num);

            Output.WriteLine(result.ToString());
        }