Ejemplo n.º 1
0
        public void Test_1()
        {
            /*
             *   It can be seen that n=6 produces a maximum n/φ(n) for n ≤ 10.
             */
            var sut = new E069TotientMaximum(10);

            Assert.Equal(6, sut.GetNWithMaxTotient());
        }
Ejemplo n.º 2
0
        public void Solution()
        {
            /*
             * Find the value of n ≤ 1,000,000 for which n/φ(n) is a maximum.
             */
            int upperlimit = 1000000;


            var sut = new E069TotientMaximum(upperlimit);

            Assert.Equal(510510, sut.GetNWithMaxTotient());

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