Beispiel #1
0
        public override string Solve(string input, int part)
        {
            KnotHash knotHash = new KnotHash(256);

            switch (part)
            {
            case 1:
                knotHash.InitializeWeak(input);
                return("" + knotHash.hash[0] * knotHash.hash[1]);

            case 2:
                knotHash.InitializeStrong(input);
                return(knotHash.ToHexString());
            }

            return(String.Format("Day 10 part {0} solver not found.", part));
        }