Exemplo n.º 1
0
        private static void GenerateForN(int n)
        {
            List <long> result = Decibinary.generateAllDbReps(n);

            Console.WriteLine(string.Format("decibinary representations of {0}", n));
            foreach (int dbrep in result)
            {
                Console.WriteLine(dbrep);
            }
            Console.WriteLine();
        }
Exemplo n.º 2
0
        public void GetSpecificDeciBinaryNumber()
        {
            int groupSize = 10;

            for (int x = 1; x <= groupSize * 10; x++)
            {
                if (x % 10 == 0)
                {
                    Console.WriteLine();
                }
                Console.WriteLine(Decibinary.GetSpecifiedDeciBinaryNumber(x));
            }
        }
Exemplo n.º 3
0
        private static void DoTest(StreamReader sr)
        {
            int q = Convert.ToInt32(sr.ReadLine());

            for (int qItr = 0; qItr < q; qItr++)
            {
                long x = Convert.ToInt64(sr.ReadLine());

                long result = Decibinary.GetSpecifiedDeciBinaryNumber(x);

                Console.WriteLine(result);
            }
        }