コード例 #1
0
        public override string FirstStar()
        {
            var input  = ReadLineInput();
            var result = DuetAssembly.RecoveredFrequency(input.ToArray());

            return(result.ToString());
        }
コード例 #2
0
ファイル: Tests.cs プロジェクト: dunder/advent-of-code
        public static void Problem1_Example()
        {
            string[] input =
            {
                "set a 1 ",
                "add a 2 ",
                "mul a a ",
                "mod a 5 ",
                "snd a   ",
                "set a 0 ",
                "rcv a   ",
                "jgz a -1",
                "set a 1 ",
                "jgz a -2"
            };

            var answer = DuetAssembly.RecoveredFrequency(input);

            Assert.Equal(4, answer);
        }