예제 #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());
        }