示例#1
0
        public override string SecondStar()
        {
            var input  = ReadLineInput();
            var result = Robots.CalculateOutputProduct(input);

            return(result.ToString());
        }
示例#2
0
        public override string FirstStar()
        {
            var input  = ReadLineInput();
            var result = Robots.FindBot(input, 17, 61);

            return(result.ToString());
        }
示例#3
0
        public void Problem1_Example1()
        {
            string[] input =
            {
                "value 5 goes to bot 2                           ",
                "bot 2 gives low to bot 1 and high to bot 0      ",
                "value 3 goes to bot 1                           ",
                "bot 1 gives low to output 1 and high to bot 0   ",
                "bot 0 gives low to output 2 and high to output 0",
                "value 2 goes to bot 2                           "
            };

            var bot = Robots.FindBot(input, 2, 5);

            Assert.Equal(2, bot);
        }