//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柯于旺 原创文章,如需转载请联系本人。