Beispiel #1
0
        public void Test_CARE()
        {
            /*
             *     CARE with 1, 2, 9, and 6 respectively, we form a square number: 1296 = 362.
             *     the anagram, RACE, also forms a square number: 9216 = 962.
             */
            var sut   = new E098AnagramicSquares();
            var words = new List <string> {
                "ABOVE", "ABSENCE", "ABSOLUTELY", "ACADEMIC", "ACCEPT", "ACCESS", "ACCIDENT", "ACCOMPANY", "RACE", "CARRER", "CARE", "ADMINISTRATION"
            };

            Assert.Equal(9216, sut.GetLargestSqureNumber(words));
        }
Beispiel #2
0
        public void Solution()
        {
            /*
             * What is the largest square number formed by any member of such a pair?
             */
            var words = GetWordsFromFile();
            var sut   = new E098AnagramicSquares();

            Assert.Equal(18769, sut.GetLargestSqureNumber(words));


            /*
             *  Congratulations, the answer you gave to problem 98 is correct.
             *  You are the 9674th person to have solved this problem.
             *  This problem had a difficulty rating of 35%.
             */
        }