예제 #1
0
        public void FirstStarExample()
        {
            int[] input  = { 0, 3, 0, 1, -3 };
            var   result = JumpInterrupting.StepsToExit(input, 0);

            Assert.Equal(5, result);
        }
예제 #2
0
        public override string FirstStar()
        {
            var input  = ReadLineInput().Select(int.Parse).ToArray();
            var result = JumpInterrupting.StepsToExit(input);

            return(result.ToString());
        }
예제 #3
0
        public void SecondStarExample()
        {
            int[] input  = { 0, 3, 0, 1, -3 };
            var   result = JumpInterrupting.StepsToExitNew(input);

            Assert.Equal(10, result);
        }