コード例 #1
0
        public int Solution(string input)
        {
            List <int> lengthsSequence = lengthsSequenceRepository.GetLengthsSequence(input);
            int        product         = process.CalculateFirstTwoCircularListNumbersProduct(lengthsSequence);

            return(product);
        }
コード例 #2
0
        public string Solution(string input)
        {
            List <int> lengthsSequence = lengthsSequenceRepository.GetAsciiCodesLengthsSequence(input);

            lengthsSequence = lengthsSequence
                              .Concat(lengthsSequenceRepository.GetLengthsSequence(LENGTHS_SEQUENCE_SUFFIX)).ToList();

            string knotHash = process.CalculateKnotHash(lengthsSequence, TOTAL_ROUNDS, REDUCE_SPARSE_HASH_TIMES);

            return(knotHash);
        }