Actually, the answer to this problem is 232792560, which easily fits into an int (max size=2147483647).
See this post to see why ;)
Type: Posts; User: helloworld922
Actually, the answer to this problem is 232792560, which easily fits into an int (max size=2147483647).
See this post to see why ;)
One last small modification. I'll let you see if you can figure out how to fix it, but here's a hint:
What happens when count is divisible by 2, but not 3? The logic would become true and true and...
Are you familiar with set theory, Norm?
Basically, what I'm saying is that any set of prime factors is a subset of that main set A = {2, 2, 2, 2, 3, 3, 5, 7, 11, 13, 17, 19}
So, if you take the...
The smallest number divisible by a set of numbers is the smallest set of common prime factors.
So, you just need a list of prime factors for each number and then compute the smallest set that...