• 【Project Euler】5 第五题


    

    //2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
    //What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

            static void Main(string[] args)
            {
                for(int j=1;j<1000000000;j++)
                {
                    int count = 0;
                    for(int i=1;i<21;i++)
                    {
                        if(j%i==0)
                        {
                            count += 1;
                        }
                    }
                    if(count==20)
                    {
                        Console.WriteLine(j);
                    }
                }
            }

    版权声明:本文为 NoMasp柯于旺 原创文章,如需转载请联系本人。

  • 相关阅读:
    洛朗级数
    泰勒级数
    中心极限定理
    置信区间公式
    简单随机样本的性质
    极大似然估计
    矩估计法
    摆摊70
    天天去哪吃
    天天和树
  • 原文地址:https://www.cnblogs.com/NoMasp/p/4786197.html
Copyright © 2020-2023  润新知