Ejemplo n.º 1
0
        public override object Task1()
        {
            var code = Challenge12.ConvertCode(input);

            int[] registers = new int[4];
            registers[0] = 7;
            Challenge12.RunCode(code, registers);
            return(registers[0]);
        }
Ejemplo n.º 2
0
        public override object Task1()
        {
            var code = Challenge12.ConvertCode(input);

            int a = 0;

            for (; a < forever; a++)
            {
                int[] registers = new int[] { a, 0, 0, 0 };
                int   i         = 0;
                int   toggle    = 0;
                var   c         = code.Clone() as (char, int, bool, int, bool)[];
Ejemplo n.º 3
0
        public override object Task2()
        {
            var code = Challenge12.ConvertCode(input);

            int answer = 12;

            for (int i = 1; i < 12; i++)
            {
                answer *= i;
            }
            answer += (code[19].Item2 * code[20].Item2);
            return(answer);
        }