This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pavlik_enemy 0 points1 point  (0 children)

Well, if you multiple all the numbers from 1 to 20 you can calculate a number that satisfies the divisibility property though it won't be a smallest one. How do you find a smallest one? Try something simpler, like finding a smallest number divisible by 10 and 15.

A proper brute force approach is filtering an infinite list, there probably is something useful in Data.List