Пример #1
0
        static void Main(string[] args)
        {
            var boarding = new Boarding(File.ReadAllLines("../input.txt").Select(_ => new BoardingPass(_)));

            //Part one
            Console.WriteLine($"{boarding.GetHighestSeatId()}");

            //Part two
            Console.WriteLine($"{boarding.GetMissingSeat()}");
        }
Пример #2
0
        public void PartOneTest()
        {
            var subject = new Boarding(GetExampleInput().Select(_ => new BoardingPass(_)));

            Assert.Equal(820, subject.GetHighestSeatId());
        }