1,11,111

//1*11*111*1111*11111+?
            int q = 0;
            long sum = 0;
            for (int i = 0; i < 10; i++)
            {
                q = q * 10 + 1;
                sum = sum + q;
                //an=(10^n -1)/9
            }
            Console.WriteLine(sum);

posted @ 2013-03-19 16:06  window5549-accp  阅读(261)  评论(0编辑  收藏  举报