Beispiel #1
0
        public void Test1()
        {
            /*
             *
             *
             *
             *
             */

            var sut = new E008Largestproductinaseries();

            long expected = 5832;
            var  value    = sut.GetLagrestProduct(4, testString);

            Assert.Equal(expected, value);
        }
Beispiel #2
0
        public void Solution()
        {
            /*
             *
             * Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product?
             */



            var sut = new E008Largestproductinaseries();

            long expected = 23514624000;
            var  value    = sut.GetLagrestProduct(13, testString);

            Assert.Equal(expected, value);

            /*
             *   Congratulations, the answer you gave to problem 8 is correct.
             *
             *  You are the 309632nd person to have solved this problem.
             */
        }