Пример #1
0
        public override long CalculateMaxCycles(Input input)
        {
            long max = 0;
            long len;
            for(long i = input.Start; i<input.End; i++)
            {
                len = ComputeCycleLength(i);
                if (max < len)
                    max = len;

            }
            return max;
        }
        public void CalculateMaxCyclesTest()
        {
            Input myInput = new Input
            {
                Start = 1,
                End = 10
            };
            long output = 20;
            IChallengeCalculator myComp = new Computer();
            long actual = myComp.CalculateMaxCycles(myInput);

            Assert.AreEqual(output, actual);

        }
Пример #3
0
 public abstract long CalculateMaxCycles(Input input);