Пример #1
0
        public void Test1()
        {
            /*
             * The product 7254 is unusual, as the identity, 39 × 186 = 7254,
             * containing multiplicand, multiplier, and product is 1 through 9 pandigital.            */

            var sut = new E032Pandigitalproducts();

            Assert.True(sut.IdentityIsPandig(multiplicand: 39, multiplier: 186, product: 7254));

            int p = 40 * 186;

            Assert.False(sut.IdentityIsPandig(multiplicand: 40, multiplier: 186, product: p));
        }
Пример #2
0
        public void Solution()
        {
            /*
             * Find the sum of all products whose multiplicand/multiplier/product identity can be written as a 1 through 9 pandigital.
             */

            var sut = new E032Pandigitalproducts();

            Assert.Equal(45228, sut.GetSumOfAllPandigitalProucts());

            /*
             * Congratulations, the answer you gave to problem 32 is correct.
             * you are the 62497th person to have solved this problem.
             */
        }