计算大数阶乘 并统计'0'的个数

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Demo_JieCheng
{
    class Program
    {
        static void Main(string[] args)
        {
            int i, j, n, c, s,count=0;
            int[] f = new int[Int16.MaxValue];
            string demo = Console.ReadLine();
            n = Int32.Parse(demo);
            f[0] = 1;
            for (i = 2; i <= n; i++)
            {
                c = 0;
                for (j = 0; j = 0; j--)
              if (f[j] != 0) break;
            for (i = j; i >= 0; i--)
            {
                if (f[i] == 0) count++;
                Console.Write(f[i]);
            }
            Console.WriteLine();
               Console.WriteLine(count);
                Console.ReadKey();
        }
    }
}

你可能感兴趣的:(ACM)